Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spotstream.SubscribeToAllSymbolTickerUpdatesAsync #1017

Open
M22arius494 opened this issue Feb 28, 2022 · 3 comments
Open

Spotstream.SubscribeToAllSymbolTickerUpdatesAsync #1017

M22arius494 opened this issue Feb 28, 2022 · 3 comments

Comments

@M22arius494
Copy link

M22arius494 commented Feb 28, 2022

Describe the bug
After updating to v8 I get this error. It wasn't in previous V7 so I assume its the library (but not sure if that is really correct)

To Reproduce
socketClient.SpotStreams.SubscribeToKlineUpdatesAsync(symbols .... )
Where symbols is the FULL set of BTC, BUSD, USDT coins.
This full set can be over 300 symbols (seperated by BTC/USDT etc)

Expected behavior
I expect this to work like the V7 enige, but instead I get an error
"No response on subscription request received"

[Quick Fix]
For now i have a quick fix by reducing the amount of symbols.
But that is not an technical answer why this problems occurs

@M22arius494 M22arius494 changed the title Spotstreem.SubscribeToAllSymbolTickerUpdatesAsync Spotstream.SubscribeToAllSymbolTickerUpdatesAsync Feb 28, 2022
@JKorf
Copy link
Owner

JKorf commented Feb 28, 2022

Hi, I was just looking at this. You should be able to get this to work when you increase SocketResponseTimeout to 30 seconds. It does however take some time to finish the subscription. It seems like when you sent more than 4000 bytes to the server over the socket Binance takes 10s to process, which happens again if you sent over 8000 bytes.
Previously this was no issue as the subscription details were sent in the URL, where now they get sent over the socket. I'll be contacting Binance over this strange behavior.
Here's some test results:

Bytes send in subscribe request -> Response time
313 bytes -> 260 ms
859 bytes -> 260 ms
1966 bytes -> 260 ms
3907 bytes -> 260 ms
4180 bytes -> 10s
5545 bytes -> 10s
7759 bytes -> 10s
8335 bytes -> 20s
11155 bytes -> 20s
22195 bytes -> 30s + error (too many subs)

@JKorf
Copy link
Owner

JKorf commented Mar 1, 2022

So I've had contact with Binance over this, see https://dev.binance.vision/t/socket-live-subscribing-server-delay/9645
It might be an issue in the dotnet ClientWebsocket implementation which is used in this library. I'll see if I can get someone to look into this on the dotnet repo

@JKorf
Copy link
Owner

JKorf commented Mar 18, 2022

For reference, I've opened an issue on the dotnet repo:
dotnet/runtime#65998
There doesn't seem to be a lot of interest in this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants