You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current library version does not support combined streams. Binance did not offer this feature when the library was written. kline can listen to many streams at the same time, but it does this by opening a separate socket connection for each stream.
I think that doing the same job with a single socket connection is healthier in terms of manageability and stability. Moreover, Binance must have thought the same thing and introduced combined streams. (By the way; I noticed that the Binance load balancer resolves the stream.binance.com domain name to a different server each time. I would not have expected it to be different). Below is the combined URI of the two pairs. I recommend that you subscribe to pairs so that the length of the URL does not exceed 2000 characters (it is recommended not to exceed 2000 characters in many places. However, it can work with longer ones without any problems).
The current library version does not support combined streams. Binance did not offer this feature when the library was written. kline can listen to many streams at the same time, but it does this by opening a separate socket connection for each stream.
I think that doing the same job with a single socket connection is healthier in terms of manageability and stability. Moreover, Binance must have thought the same thing and introduced combined streams. (By the way; I noticed that the Binance load balancer resolves the stream.binance.com domain name to a different server each time. I would not have expected it to be different). Below is the combined URI of the two pairs. I recommend that you subscribe to pairs so that the length of the URL does not exceed 2000 characters (it is recommended not to exceed 2000 characters in many places. However, it can work with longer ones without any problems).
The combined URI above subscribes to bnbusdt and btcusdt's 1 minute frames and receives a data stream over a single socket.
After patching the library with the code above, you can use it as in the example below.
I hope it helps
The text was updated successfully, but these errors were encountered: