Limits and batches
Every limit below is served as data by GET /v2/dql/catalogue. Read it from there rather than carrying
a copy: these are what the platform runs on today, and a client that hard-codes them will be wrong on
the day they change. The sentences here say what to do when you meet one.
Nothing is silently truncated. A request past a limit is refused with DQL_LIMIT or DQL_COMPLEXITY
and the message states both your figure and the ceiling — because a short answer that looks complete is
worse than a refusal.
What a query may be
Section titled “What a query may be”| limit | value | what it means |
|---|---|---|
source_bytes |
8,192 | The longest query text accepted. |
nodes |
256 | Nodes in the parsed query. A condition with dozens of clauses meets this before it meets anything else. |
depth |
24 | How deeply the expression may nest. |
quantifiers_and_aggregates |
16 | How many any, all, count, max, min and sum one query may hold together. |
series_calls |
32 | How many series functions one query may call. |
timeframes |
3 | How many different periods one query may read. Reading three is a heavy query; reading four is a different question asked twice. |
window |
500 | The largest window a series function may ask for, in periods — sma(close, 500) is the longest average there is. |
bars_per_atom |
2,000 | The most bars one series read may cost. |
cost |
10,000 | What the whole query may cost. POST /v2/dql/parse returns a query’s cost without running it, so this can be seen before it is hit. |
in_list |
32 | The longest in (…) list. |
select |
16 | How many values one select may return. |
order_by |
4 | How many keys one order by may have. |
freshness_min |
1 s | The shortest freshness bound a query may set. Below this you are asking about jitter, not about staleness. |
freshness_max |
7 d | The longest. Past it, stale stops meaning anything. |
screen_limit |
500 | The largest page POST /v2/screen returns. Use page.next_cursor for the rest; the cursor pins the instant, so page two sees the world page one saw. |
What one request may ask for
Section titled “What one request may ask for”| limit | value | endpoint |
|---|---|---|
snapshots_listings |
500 | POST /v2/snapshots — or every listing of a single venue, however many that is. |
history_listings |
100 | POST /v2/snapshots/history. |
history_rows_per_layer |
2,000 | POST /v2/snapshots/history, in interval and at modes. |
history_raw_rows |
100,000 | POST /v2/snapshots/history, in raw mode, across every listing and layer together. |
candles_listings |
100 | POST /v2/candles. |
candles_per_listing |
1,500 | POST /v2/candles. |
books_listings |
100 | POST /v2/books. |
book_depth |
25 | POST /v2/books — levels per side. A larger depth is clamped to this and the answer states what was applied. |
stream_listings |
500 | GET /v2/stream — listings on one connection. |
response_bytes |
8,388,608 | Any endpoint. A response that would be larger is refused rather than cut. |
Plan limits are a different thing
Section titled “Plan limits are a different thing”The numbers above are the same for everyone: they are what one request may ask the platform to do at
once. How far back you may look, how often you may ask, and how many streams you may hold are set by
the plan, and are refused with PLAN_LIMIT or RATE_LIMITED instead. A 429 carries Retry-After.