PMDataDocs
Data Schemas

L2

Schema for Polymarket L2 order book and market events.

Each row represents a Polymarket order book or market-status event.

Data type: l2 · Download sample ↗

Schema

All fields come from the raw Polymarket WebSocket, not computed by PMData. E.g. best_ask is websocket_msg.price_change.price_changes[].best_ask.

FieldTypeDescription
market_slugstringPolymarket market_slug.
timestamptimestamp[us]Polymarket event timestamp.
local_timestamptimestamp[us]PMData receive timestamp.
event_typestringbook, price_change, market_resolved, or tick_size_change.
ask_priceslist<float> | nullAsk prices; index 0 is the best ask. Source: book event.
ask_sizeslist<float> | nullAsk size at each price in ask_prices. Source: book event.
bid_priceslist<float> | nullBid prices; index 0 is the best bid. Source: book event.
bid_sizeslist<float> | nullBid size at each price in bid_prices. Source: book event.
best_askfloat | nullBest ask. Source: price_change event.
best_bidfloat | nullBest bid. Source: price_change event.
pc_pricefloat | nullUpdated price level. Source: price_change event.
pc_sizefloat | nullNew aggregate size at pc_price. Zero removes the level. Source: price_change event.
pc_sidestring | nullUpdated side: BUY or SELL. Source: price_change event.
new_tick_sizefloat | nullNew minimum tick size. Source: tick_size_change event.
winning_outcomestring | nullWinning outcome. Source: market_resolved event.

Event types

  • book — Complete order book snapshots sent on subscription and after trades that change the book.
  • price_change — Price-level updates caused by new or cancelled orders.
  • tick_size_change — Changes to a market's minimum tick size.
  • market_resolved — Market resolution events containing the winning outcome.

Example data

book row:

market_slugevent_typeask_pricesask_sizesbid_pricesbid_sizes
btc-updown-5m-1784332800book[0.51, 0.52, …, 0.99][619.93, 162.67, …, 43595.86][0.50, 0.49, …, 0.01][393.44, 188.75, …, 43546.02]

price_change row:

market_slugevent_typepc_pricepc_sizepc_sidebest_askbest_bid
btc-updown-5m-1784332800price_change0.11726BUY0.510.50