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 retail/institutional users, the connection limit is 5 for both market-specific and market-agnostic WebSockets. This limit is shared by both the UI and API access and can be increased upon request.
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.
For market-agnostic connections, the connection limit is per market limit * number of supported markets.
If you exceed this limit, you will receive a 403
status code.
Rate Limit
New connections are rate-limited to 60 per minute for market makers and 20 per minute for retail/institutional users. If you exceed this limit, you will receive a 429
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.