Data Structure
Each orderbook snapshot contains bid and ask arrays as[price, size] tuples:
Query Orderbooks
Query orderbook snapshots with filters. Results are ordered by timestamp descending (most recent first).
At least one of
market_id or asset_id is required.Query Parameters
Examples
Get orderbook history for a market:Get Latest Orderbook
At least one filter parameter (
market_id, asset_id, or outcome) is required.Query Parameters
Examples
Get latest orderbook for a market:This endpoint has a 500ms cache TTL for near real-time data access.
Get Orderbooks by Market ID
Convenience endpoint to get orderbook snapshots for a specific market. Results are ordered by timestamp descending.
Path Parameters
Query Parameters
Example
Pagination Example
For large historical queries, use cursor-based pagination. Start with a very highcursor_ts value and follow the next cursor:
Common Use Cases
Backtesting
Fetch historical orderbooks within a time range to simulate trading strategies.
Spread Analysis
Calculate bid-ask spreads over time to analyze market liquidity.
Event Studies
Study how orderbooks change around major news events.
Market Making
Analyze historical depth to calibrate market making parameters.