Restrictions
Reconnect
In case of a closed or lost connection, we recommend that you wait for 5 seconds before reconnecting and implement the reconnect logic using exponential backoff.
Connection Limit
For market-agnostic connections, the connection limit is 2 * number of supported markets.
For market-specific connections, the connection limit is 4 per market for Order Creation WebSocket while it’s limited to 2 per market for all the other WebSockets. If you exceed this limit, you will receive a 403
status code.
Best Practices
We should always close the old connection explicitly before opening a new one. This will not only help you avoid hitting the connection limit, but also ensure that you get the best performance from the WebSocket API. If you need to check your orders from our exchange app, make sure that you only have one browser tab open because the connections from the app are counted towards the connection limit as well.