Limits
How often and how much: the limits of the listener, of requests and of the stream.
Limits of the listener
Counted for the whole listener, not per client. GET /v1/meta returns the values of the running terminal; an excess is answered with 429 rate_limited.
| Limit | Value | Description |
|---|---|---|
ws_connections_per_token | 8 | Stream connections per token. |
subscriptions_per_connection | 100 | Subscriptions per stream connection. |
api_only_instruments | 50 | Instruments opened only for the API. Those open in the window do not count. |
exchange_subscriptions_per_second | 5 | New subscriptions on exchanges a second. |
commands_per_second | 10 | Trading commands a second, for all clients together. |
workspace_commands_per_second | 5 | Workspace commands a second, for all clients together. |
settings_commands_per_second | 5 | PATCH /settings requests a second, for all clients together. |
Limits of requests
The bounds of parameters and of lists in request bodies, as the specification states them.
| Operation | Parameter | Range | Default |
|---|---|---|---|
GET /v1/instruments | limit | 1–2000 | 500 |
GET /v1/market/candles | limit | ≤ 2000 | 500 |
GET /v1/market/trades | limit | 1–1000 | 100 |
GET /v1/market/orderbook | depth | 1–200 | 50 |
GET /v1/account/fills | limit | 1–1000 | 100 |
POST /v1/workspace/windows/{id}/tabs/{tab}/stacks | items | 1–50 | |
POST /v1/workspace/tabs | items | 1–50 | |
POST /v1/workspace/tabs | name | ≤ 64 | |
PATCH /v1/settings | changes | 1–100 |
Limits of the stream
Close codes
| Code | Meaning |
|---|---|
1001 | the API was switched off or the token was reissued |
4008 | the client is too slow and did not keep up for longer than 5 s |
4029 | the limit of stream connections per token |
Limits
GET /v1/meta returns the limits. A refusal is an error frame with
rate_limited in answer to the request, or a close with 4029.
| Limit | Value |
|---|---|
| stream connections per token | 8 |
| subscriptions per connection | 100 |
| instruments opened only for the API | 50, not counting those open in the window |
| new subscriptions on exchanges a second | 5 |
Slow clients
A client that does not read slows down neither the terminal nor other
clients. Frames it does not take in time are dropped. For trades a
gap frame names the lost numbers. For the other topics the next frame
is simply newer.
Errors
The error codes of the Local API, the errors the clients raise and the close codes of the stream.
API version, build and limits GET
The version of the API, the build of the terminal, the scopes of the token, the limits and the topics of the stream. A terminal built without market data lists only `workspace` and `settings` in `topics`. Market topics and market operations answer `unsupported` then.