Historical order book depth
get_order_book_historyFetch historical full L2 order book depth for a Polymarket market, showing bid and ask ladders at selected time intervals to reconstruct past liquidity.
Instructions
Full L2 bid and ask ladders over time for a market — every price level and the size resting at each. This is data Polymarket does not archive: its /book endpoint returns only the current state, so depth exists only where it was captured live.
One thing to expect when reading the results: binary markets go one-sided as they resolve. In the final minute of a 5-minute market most snapshots have an empty bid or ask side, because nobody offers the losing outcome. That is real market behaviour rather than missing data, so guard before indexing the first level of a ladder.
Responses are large. Keep the window narrow or the resolution coarse: a one-hour window at 1s is 3,600 buckets per token, and a market has two tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Buckets per page, default 50. Use the returned next_cursor to page. | |
| cursor | No | next_cursor from a previous response | |
| end_ts | Yes | ISO-8601 UTC, e.g. 2026-08-23T14:00:00Z | |
| start_ts | Yes | ISO-8601 UTC, e.g. 2026-08-23T14:00:00Z | |
| id_or_slug | Yes | Market slug, e.g. btc-updown-5m-1787551200 | |
| resolution | No | Defaults to 1m. Use 1s only for short windows. |