how to practically stream all bookTickers?

Hi,

my question is how do you work around the streaming subscription limitation and when do they take effect? The documentation says to avoid listening to more than 200 streams.

https://binance-docs.github.io/apidocs/futures/en/#websocket-market-streams:
A single connection is not recommended to listen to more than 200 streams.

Further up in the change-log it says:

https://binance-docs.github.io/apidocs/futures/en/#change-log
A single connection can listen to a maximum of 200 streams.

Now how is it recommended to stream more than 200 symbols? Would you set up proxies or are multiple websocket connections by the same IP okay for it?

WebSocket connections have a limit of 10 incoming messages per second.

If a websocket connection has a limit of 10 /s, what happens to the other updates? Are they just dropped?

Hey,
Considering the limit of 200 streams per connection and the restriction of sending no more than 10 messages per second, it’s advisable to send requests from different IPs.

Exceeding the limits of message, as outlined in the documentation, may result in your IP being banned, preventing further requests from that IP.

hey, thanks for the explanation for the 10msg per second, but how do you go about receiving messages? As in price updates? Can you subscribe to more than 200 streams (say bookTicker) from one IP?

You should open multiple connections, with each listening to a subset of streams.

Using the same IP address is fine. There is no limit on the number of listening connections, so you long as you can keep up with the update rate.

Note that this is the limit on the incoming messages (from you to the server): e.g., channel subscription requests. This does not limit the rate at which updates are streamed to you.

1 Like

thanks so much for the clarification.