PMDataDocs
Data SchemasPolymarket US

L2

Schema for Polymarket US L2 order books.

All fields come from the raw Polymarket US WebSocket message. PMData adds only the receive timestamp local_timestamp.

Data type: l2 (polymarket_us)

Source: SUBSCRIPTION_TYPE_MARKET_DATA, message marketData. One file per market per UTC day. Polymarket US sends the complete book in every message, so every row is a full order book. Prices are the price of the market's long outcome (the catalog's yes_outcome).

FieldTypeDescription
market_slugstringPolymarket US market slug. Source: marketData.marketSlug.
timestamptimestamp[ns]Polymarket US transaction time. Source: marketData.transactTime.
local_timestamptimestamp[ns]PMData receive timestamp.
event_typestringMessage type: marketData.
bid_priceslist<double>Bid prices in US dollars (0 to 1), best first. Source: marketData.bids[].px.value.
bid_sizeslist<double>Contracts at each price in bid_prices; can be fractional. Source: marketData.bids[].qty.
offer_priceslist<double>Offer (ask) prices in US dollars, best first. Source: marketData.offers[].px.value.
offer_sizeslist<double>Contracts at each price in offer_prices. Source: marketData.offers[].qty.
statestringMarket state, as sent: MARKET_STATE_OPEN, MARKET_STATE_PREOPEN, MARKET_STATE_SUSPENDED, MARKET_STATE_HALTED, MARKET_STATE_EXPIRED, MARKET_STATE_TERMINATED, MARKET_STATE_MATCH_AND_CLOSE_AUCTION. Source: marketData.state.
  • To replay, replace the whole book with each row.
  • Not stored: marketData.stats (last trade price, volume, open interest, high and low), which are statistics rather than the book.

Timestamps

All timestamps are UTC with nanosecond precision (timestamp[ns]). pandas reads them as datetime64[ns].

On this page