Connection limits
| Scope | Limit |
|---|---|
| New connections | 1,000 per minute |
| Requests per connection | 200 per minute |
1000 connections per minute.
Limit JSON-RPC requests to 200 requests per minute per connection.
Reuse a single WebSocket connection for multiple subscriptions. Opening a new connection per channel consumes the connection limit and increases latency.
Rate limit handling
Implement request throttling on the client side. Queue subscription requests instead of sending bursts of requests. Apply exponential backoff with jitter after receiving error code7.
Reuse active connections instead of creating new connections.
Rate limit error example
Connection timeout
The server closes the WebSocket connection after60 seconds of inactivity. Inactivity means no messages sent by the client.
Send a ping request every 50 seconds to keep the connection alive:
JavaScript
Error codes
The server returns errors in theerror field of a response message. The error object contains a code and a message.
| Code | Message |
|---|---|
1 | invalid argument |
2 | internal error |
3 | service unavailable |
4 | method not found |
5 | service timeout |
7 | too many requests |
The server closes the WebSocket connection immediately if the client sends invalid JSON.
Best practices
Reuse connections. Each subscription does not require a new connection. Subscribe to multiple channels on a single connection to stay within the1,000 connections per minute limit.
Implement reconnection logic. Handle unexpected disconnections with exponential backoff (for example, wait 1s, 2s, 4s, 8s between retries). Re-subscribe to all channels and re-authorize private channels after reconnecting.
Batch subscriptions. Subscribe to all required channels immediately after connecting rather than one at a time. Batching reduces round-trips and avoids hitting the 200 requests per minute per connection limit during setup.
Monitor ping latency. A slow or missing pong response indicates network issues. Reconnect if the server does not return pong within 10 seconds after a ping.
Related resources
- WebSocket Overview — Connection endpoint, message format, and quickstart.
- WebSocket Authentication — Authorization flow for private channels.
- REST API Rate Limits & Error Codes — REST-specific limits and error formats.