Rate limits are applied on a per-account basis. If the API endpoint does not require authentication, rate limits are applied on the IP address instead of the account.
Rate Limits on REST API
When the rate limit is hit on the REST API,
- A 429 HTTP Status is returned.
X-RETRY-AFTER
header is returned. This header indicates the number of nanoseconds to wait until you can retry a new request.- The body of the response will also include the same information.
Example:
{
"error": "RATE_LIMIT_EXCEEDED",
"retry_after": "4406000000"
}
Rate Limits on Websocket API
While there are no limit on the number of subscriptions, Websocket messages such as subscribe
, unsubscribe
and other operations are bound by a rate limit. The only exception is the ping
message.
When the rate limit is hit:
- RATE_LIMIT_EXCEEDED` error message will be sent
- The message will contain
retry_after
information, the number of nanoseconds to wait until you can send a new message.
Example:
{
"status": "error",
"timestamp": "1664338190185908000",
"error": "RATE_LIMIT_EXCEEDED",
"data": {
"retry_after": "4406000000"
}
}