Hi,
According to Binance API doc, there is a restriction of single websocket connection can subscribe up to 200 streams, and binance usdt futures has 264 symbos, and it’s still increasing every few days.
I am using python-binance wrapper, and I use:
‘ws_streams_list’ includes 264 streams for 4 candle intervals, that’s 264*4=1056 streams.
I can use futures_multiplex_socket() method to subscribe to multiple streams:
kline_streams = bsm.futures_multiplex_socket(streams=ws_streams_list)
but as you can see from the binance api doc, ONE connection can only subscribe up to 200 streams for futures. So in my case, one connection CAN NOT handle 1056 streams.
but the author of python-binance warpper said:
“Multiple socket connections can be made through either manager.”
https://python-binance.readthedocs.io/en/latest/websockets.html
Sad fact is that he did not mention HOW to make multiple socket connections through Binance Socket Manager (the method I use from python-binance wrapper)
Now, it’s hard to get reach the author of this wrapper, now please, this is out of my knowledge,
anyone who is knowledgable about how to make multiple socket connections through Binance Socket Manager from python-binance, please help.
I think I have to split the streams into 190 streams per connection and make like 6 connections to get 1056 streams all together. I do not want to run my python script 6 times in the background, that’s a bad solution.
Thank you so much.