Max message size for websocket subscription

The documentation says 1024 streams can be subscribed on a single websocket connection. I am trying to start this subscription for all 1024 streams at a time using a single request with method=SUBSCRIBE as described here

But I get the parsing error from Binance while doing this through my own C++ implementation. I tried the same with python-binance in python and I see that I am able to successfully subscribe at a time to 825 streams but not 826 streams.

I would like to know if there is a limit on message size that I can send on websocket.

Hi,

There is a limit of 5 messages per second. The limit of 1024 streams means that you can slowly build up to 1024 streams by submitting 5 streams per second. As for maximum message size, it can vary but its generally not recommended to send messages over 16kb in size.

Hopefully that helps clarify.

Hi, Thank you. That was helpful.