Skip to main content
GET
/
v1
/
markets
/
{condition_id}
/
book
Get Order Book
curl --request GET \
  --url https://api.polysimulator.com/v1/markets/{condition_id}/book \
  --header 'X-API-Key: <api-key>'
{
  "token_id": "<string>",
  "bids": [],
  "asks": [],
  "timestamp": "<string>",
  "market": "<string>",
  "asset_id": "<string>",
  "hash": "<string>",
  "min_order_size": "<string>",
  "tick_size": "<string>",
  "neg_risk": true,
  "last_trade_price": "<string>",
  "spread": "<string>",
  "mid": "<string>",
  "stale": true
}

Authorizations

X-API-Key
string
header
required

Issue from /v1/keys (or admin-issued for enterprise tier).

Headers

X-API-Key
string | null

Your PolySimulator API key

POLY_API_KEY
string | null

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.

Poly-API-Key
string | null

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.

authorization
string | null

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

condition_id
string
required

Query Parameters

outcome
string | null

Outcome label (e.g. Yes, No, Up, Down). Defaults to first available outcome.

depth
integer | null

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.

Required range: 1 <= x <= 500

Response

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.

token_id
string
required
bids
BookLevel · object[]
asks
BookLevel · object[]
timestamp
string | null
market
string | null
asset_id
string | null
hash
string | null
min_order_size
string | null
tick_size
string | null
neg_risk
boolean | null
last_trade_price
string | null
spread
string | null
mid
string | null
stale
boolean | null