Rate Limits
Last updated
Last updated
The REST API rate limits requests by IP address AND, in some cases, by route.
IP Address: 250 requests per 10 seconds.
If you exceed this, a 429
error is thrown and you have to wait 60 seconds before resuming.
Route-specific limits: Routes with unique rate limits are specified in the route details within this documentation. e.g. Get All Done Orders.
If the route details do NOT specify a rate limit then the route does not have a specific rate limit.
If you exceed this, a 429
error is thrown and you have to wait 10 seconds before resuming requests to this specific route.
sFOX recommends using the WebSocket API for retrieving data as much as possible as this will not count towards the request limit.
Note: sFOX typically enforces route-specific rate limits on routes that return data that is available via the WebSocket API e.g. account balances.
The WebSocket API rate limits requests and connections by IP address. If you exceed a rate limit, an error is thrown and your requests will be blocked for 2 minutes. Rate limits for the WebSocket API are as follows:
Type | Limit |
---|---|
Connections
10 active connections per IP address.
Requests
40 requests per 1 minute per IP address. Requests are counted, in total, across your active connections.