Get Order Book
Fetch the CLOB order book for a market outcome.
Returns bids and asks with configurable depth.
Requires a valid token_id in the cache (from the price enrichment data).
If outcome is omitted, the first available outcome is used automatically
(supports binary Yes/No and categorical Up/Down markets).
Authorizations
Issue from /v1/keys (or admin-issued for enterprise tier).
Headers
Your PolySimulator API key
Polymarket-CLOB-compat alias for X-API-Key (underscore form). SDK clients ported from Polymarket can authenticate without changing header names. X-API-Key takes precedence when both are provided.
PM-CLOB-compat dashed-form alias for X-API-Key. Same value semantics as POLY_API_KEY but with HTTP-conventional dash separators. Audit P1 (staging audit 2026-05-16 0817 PR #1296): the per-tier middleware accepts both spellings but the auth dependency originally only matched the underscore form — now both work end-to-end.
PM-CLOB-compat: Authorization: Bearer ps_live_... (or ps_test_...) is accepted as an alias for X-API-Key so py-clob-client and other ported SDKs authenticate without header name changes. Bearer JWTs are NOT accepted here — use the dashboard-auth endpoints for those.
Path Parameters
Query Parameters
Outcome label (e.g. Yes, No, Up, Down). Defaults to first available outcome.
OPTIONAL trim: keep only the best N levels per side. Default (omitted) returns the FULL book — Polymarket's wire contract (PM has no depth param). Pre-2026-06-11 the default silently truncated to 10 levels (max 50), so ported depth/imbalance/queue-position logic computed on a sliver of the real book.
1 <= x <= 500Response
Successful Response
Polymarket-compat OrderBookSummary.
The PM-CLOB GET /book response carries metadata fields
(market, asset_id, hash, timestamp,
min_order_size, tick_size, neg_risk,
last_trade_price) that SDK consumers ported from Polymarket
clients depend on — particularly tick_size for client-side
price quantization and neg_risk for routing through the
correct contract. Pre-this-PR the response was a Polysimulator
minimum (token_id, bids, asks, spread, mid)
that would silently break PM-ported SDKs at parse time.
The legacy fields (spread, mid) are kept for back-compat
with existing Polysimulator SDK consumers who relied on them.
Polymarket's actual /book doesn't return either; they're
Polysimulator extensions and documented as such.