CLOB Read (Public)
Get Spread
Get the best bid/ask spread for a single token.
Public endpoint — no authentication required.
Mirrors Polymarket’s GET /spread?token_id=..., including the
$0.10 cap on reported spread for thin markets.
GET
Get Spread
Previous
Get Book By TokenGet the order book for a single token.
Public endpoint — no authentication required.
Mirrors Polymarket's `GET /book?token_id=...` shape (``market``,
``asset_id``, ``timestamp``, ``hash``, ``tick_size``, ``neg_risk``,
``last_trade_price``, ``min_order_size`` from PR #1033 P1-1).
**Level ordering is byte-identical to Polymarket's LIVE ``/book``
wire** (verified against ``clob.polymarket.com/book`` 2026-06-10):
``bids`` are ASCENDING by price (best/highest bid = ``bids[-1]``) and
``asks`` are DESCENDING by price (best/lowest ask = ``asks[-1]``) —
the best level is at the TAIL on BOTH sides, exactly as PM's live
CLOB returns it. Note this is the *wire* ordering; PM's published
docs describe the opposite, but the live wire does not match the
docs and wire-parity is the contract here. ``mid`` and ``spread`` are
computed from the FULL book (true top-of-book), not from the
truncated slice — see ``_book_levels_and_summary``.
**RECOMMENDED — read order-independently**: do NOT index a fixed
position. Compute best bid as ``max(float(b["price"]) for b in
bids)`` and best ask as ``min(float(a["price"]) for a in asks)``.
This stays correct regardless of array order and survives any future
wire-format change on either side.
**MIGRATION NOTE (2026-06-10)**: book level ordering changed to PM
live-wire parity. History (3 changes in 24h): pre-2026-05-19 bids
were ASCENDING (best = ``bids[-1]``); the 2026-06-10 AM change flipped
to bids DESCENDING / asks ASCENDING (best = ``[0]``) to match PM's
*docs*; this change re-sorts to PM's *live wire* — bids ASCENDING /
asks DESCENDING (best = ``[-1]``). A bot that read ``bids[0]`` for the
best bid during the brief docs-aligned window now gets the WORST bid;
switch to the order-independent ``max``/``min`` reads above.
Next
Get Spread