Market Data
L2 Orderbooks
Replay raw captures into sorted top-25 historical books.
GET
L2 Orderbooks
This endpoint replays source captures from a preceding snapshot and returns a sorted top-25 book after each L2 event. Unlike L2 Orderbook Updates, each returned row represents a reconstructed book. Deltas before a source snapshot produce no book.
Request
Query parameters
Access and behavior
source, market, start, and end are required. The time range is inclusive and may have any duration, but replay is limited to 100,000 matching raw captures, 1 GiB of ClickHouse reads, and 30 seconds. Requests over a limit return 422. Older history requires a Polaris API key. source_event_is_snapshot marks the source event that produced each complete book.
Response
items[] fields
A
next_cursor continues the same source, market, instrument, and time range. For source snapshots and sparse absolute-level updates without reconstruction, use L2 Orderbook Updates.
Pagination
Passnext_cursor as cursor with the same filters. Stop when has_more is false, or when next_cursor is null for endpoints without has_more. A cursor is opaque; do not edit or reuse it with different filters.
Errors
The OpenAPI contract lists400, 401, 422, 429, 503. Error responses use error.code, error.message, and error.resolution. Narrow an expensive query after 422. Follow Retry-After after 429.
For the machine-readable contract, see the OpenAPI document.