[from, to] and bucket size step, returns one orderbook snapshot per bucket: top-of-book bid/ask, mid, spread, total resting orders, total maker count, and depth aggregated across the top-N levels per side.
Each snapshot is built by the same engine as /v1/markets/:id/book/at/:ts — verified byte-for-byte against that endpoint.
Endpoint
Query parameters
If both
from and limit are omitted, you get the last limit × step worth of buckets ending at now — sane default for a “show me depth over the last hour” call.
Response
Use cases
- Spread / liquidity charts — render line charts of
mid,spread,bids_top_sizeover a chosen window. - Volatility surveys — large
spreadvalues flag illiquid regimes; small spreads + thick top-of-book = healthy market. - Pre-resolution liquidity profiling — call this with
step=1magainst the final hour before settlement to see how liquidity behaves as expiry approaches. - Cross-market comparison — bulk-call across multiple
outcome_ids to compare which is most liquid.
Examples
Performance
- Each snapshot triggers one read query per requested side. Queries fan out at concurrency 8 against a 32-slot pool, so a single
depth-historycall cannot starve other API traffic. - 12 points (1h × 5m): ~1–2s typical
- 60 points (1h × 1m): ~5s typical
- 240 points (4h × 1m): ~25s typical
- 500 points (cap): ~60s
step values. For exact instantaneous quotes use /v1/markets/:id/book (live, edge-cached 1s).
Errors
Notes
- Snapshot at the exact returned
tis reproducible by calling/v1/markets/:id/book/at/:t— same numbers. - Empty book (e.g.
t < history_starts) returnsnullforbest_bid/best_ask/mid/spreadand zeros for size/count fields. points_returnedmay be less thanpoints_requestedonly when the window doesn’t fitlimitbuckets.