PMData LogoPMDataDocs
Data sets

L2

L2 data is collected from the Polymarket websocket feed. Available since 2026-02-01.

Data type: poly_l2

Format: Single-market Parquet file by slug. Use the Day API for daily ZIP archives.

import pandas as pd

slug = "btc-updown-5m-1783842600"
data_type = "poly_l2"
url = f"https://api.pmdata.dev/download/{data_type}/{slug}.parquet"

df = pd.read_parquet(
    url,
    storage_options={
        "api_key": "<YOUR_API_KEY>",
        "User-Agent": "Mozilla/5.0",
    },
)
print(df.head())

Schema

FieldTypeDescription
market_slugstringPolymarket market slug.
timestamptimestampExchange event timestamp in UTC.
local_timestamptimestampPMData receive timestamp in UTC.
event_typestring'book' | 'price_change' | 'market_resolved' | 'tick_size_change'
ask_priceslist<float> | nullAsk price levels for book rows; ask_prices[0] is the best ask.
ask_sizeslist<float> | nullAsk size at each price level for book rows.
bid_priceslist<float> | nullBid price levels for book rows; bid_prices[0] is the best bid.
bid_sizeslist<float> | nullBid size at each price level for book rows.
best_askfloat | nullBest ask after a price change.
best_bidfloat | nullBest bid after a price change.
pc_pricefloat | nullChanged price level.
pc_sizefloat | nullNew aggregate size at the updated price level.
pc_sidestring | nullOrder book side of the updated price level, BUY or SELL.
new_tick_sizefloat | nullNew minimum tick size when announced by the feed.
winning_outcomestring | nullWinning outcome when announced by the feed.

On this page