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

The maximum number of connections allowed per market is 2. 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.