Skip to content

Rate limits#

REST#

Every signed REST request counts against your account's budget. All API keys of the account (team) share one budget.

Limit Default Meaning
Requests per second 20 Refill rate of a token bucket
Burst 100 Size of the bucket: how many requests you can send at once after a quiet period
Requests per day 100 000 Per UTC day; the count restarts at 00:00 UTC

Anboto can raise these for your account, up to 100 requests per second, a burst of 500 and 500 000 requests per day.

A request over the budget is answered 429 Too Many Requests with a JSON body and a Retry-After header:

HTTP/1.1 429 Too Many Requests
Retry-After: 1
Content-Type: application/json

{"code": 5, "message": "Rate limit exceeded", "reason": "burst", "retry_after_ms": 50}
Field Meaning
code 5 = RATE_LIMIT_EXCEEDED
reason burst: the bucket is empty; wait retry_after_ms for the next token. daily_quota: the day's requests are used up; retry_after_ms runs until 00:00 UTC
retry_after_ms How long to wait, in milliseconds
Retry-After header The same wait in whole seconds, rounded up

A request refused because the bucket is empty does not count toward the daily total.

A request whose X-TIMESTAMP is more than X-RECV-WINDOW ms (default 5000) in the past is rejected, currently with a generic server error rather than 401 (see Errors).

WebSocket#

Limit Default On breach
Concurrent connections per account 5; Anboto can raise it up to 50 the connection that goes over the limit gets a code-5 error frame (connection limit reached (5 per account)) and is closed (1008). Connections opened earlier stay up
Messages per second per connection 10 (burst 20) code-5 error frame per dropped message; sustained flooding closes the connection (1008)
Subscriptions per connection (all topics) 50 code-5 error frame
Market data subscriptions per connection 20 error frame ("limit reached")

Error code 5 = RATE_LIMIT_EXCEEDED.