The below rate limits have been implemented to safeguard our system. Rate limiters use a "fixed window" algorithm to discretely refill the request allowance every 5 seconds.
Market makers are eligible for higher rate limits. To apply for increased rates, please contact our support team.
Type | REST | WS matching | WS non-matching | WS connections | Burst Multiplier |
---|---|---|---|---|---|
Trader | 10 TPS per IP | 1 TPS per account | 5 TPS per account | 4x per IP | 5x |
Market Maker | 10 TPS per IP | up to 500 TPS per account | up to 500 TPS per account | up to 16x per IP | 5x |
Burst requests for both REST and WebSockets are refreshed every 5 seconds. E.g a trader can send 25x matching requests in a single burst but must wait 5 seconds before any further requests can be sent.
REST
All requests over the REST API are rate limited per IP. If the limit is crossed,429 Too Many Requests
response is returned.
WebSocket
To access the above rate limits, all clients must authorize themselves via the public/login
route. Otherwise, a reduced rate limit will be applied. Requests exceeding the rate limit will receive the below response:
{
id: number
error: {
code: -32000,
message: "Rate limit exceeded",
data: "Retry after ${cooldown} ms"
}
}
Only via WebSockets, the live remaining rate limits can be checked using the private/getRateLimits
route.
// send getRateLimit request
ws.send(JSON.stringify({
'public/getRateLimits`,
{},
id: 1,
});
// example response
{
"id": 4,
"result": {
"remaining_matching": {
"remainingPoints": 22,
"msBeforeNext": 4809,
"consumedPoints": 3
},
"remaining_non_matching": {
"remainingPoints": 98,
"msBeforeNext": 4809,
"consumedPoints": 2
},
"remaining_connections": {
"remainingPoints": 29,
"msBeforeNext": 8881,
"consumedPoints": 3
}
}
Matching vs Non-Matching
The below requests are counted as "matching" requests. Any request outside of this list is counted as "non-matching".
private/order
private/cancel
private/cancel_all