Fetch Order Book
Fetch the order book (bids/asks) for a specific outcome. Supports live and historical queries. For historical data, pass since to get a single snapshot, or since + until to get an array of fully reconstructed L2 books from the archive. Range queries return up to limit snapshots (default 100, max 1000).
Documentation Index
Fetch the complete documentation index at: https://pmxt-docs-fetch-order-book-historical-clarity.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Use cases
Live order book
Fetch the current L2 order book for an outcome from the exchange’s live order book endpoint. For Polymarket this is a live CLOB call: pass the outcome token ID directly and omit historical params.Historical snapshot
Get the order book at a specific point in time by passingsince as a Unix timestamp in milliseconds. Historical Polymarket queries are served from the PMXT Archive and return the nearest reconstructed snapshot at or before that time.
For binary markets, you can pass the Polymarket condition ID as the first argument and choose the side with params.outcome. Use "yes" or "no" instead of copying the long outcome token ID.
Historical crypto 5m events
Polymarket crypto 5-minute slugs such asbtc-updown-5m-1779481500 are event slugs. Use fetch_event(slug=...), then select the nested market you want. Do not use fetch_market(slug=...) for these event-level slugs.
Historical range (reconstructed L2 books)
Pass bothsince and until to get an array of fully reconstructed L2 order book snapshots. Each snapshot is a complete book at that moment in time — not deltas.
The API returns up to limit snapshots from the PMXT Archive. Defaults to 100 snapshots per request, max 1000. For raw bulk downloads, use the Parquet files in the PMXT Archive instead of trying to stream bulk data through the live order book endpoint.
fetchOrderBook supports Polymarket, Kalshi, Limitless, and Opinion.Path Parameters
The prediction market exchange to target.
polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, gemini-titan, hyperliquid, suibets, mock, router Query Parameters
Outcome side: 'yes' or 'no'. Required for exchanges like Limitless where the API returns a single orderbook per market.
yes, no Outcome alias: 'yes' or 'no', or an outcome token ID. When set, the first argument is treated as a market ID and this value selects which outcome's order book to fetch. Accepts the literal strings 'yes'/'no' (resolved via a market lookup) or a raw outcome token ID.
Unix timestamp (ms) — fetch a historical snapshot at or before this time, or the start of a range when combined with until (hosted API only).
Unix timestamp (ms) — end of a historical range. When combined with since, returns an array of reconstructed L2 OrderBook snapshots between since and until (hosted API only).

