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
| Field | Type | Description |
|---|---|---|
market_slug | string | Polymarket market slug. |
timestamp | timestamp | Exchange event timestamp in UTC. |
local_timestamp | timestamp | PMData receive timestamp in UTC. |
event_type | string | 'book' | 'price_change' | 'market_resolved' | 'tick_size_change' |
ask_prices | list<float> | null | Ask price levels for book rows; ask_prices[0] is the best ask. |
ask_sizes | list<float> | null | Ask size at each price level for book rows. |
bid_prices | list<float> | null | Bid price levels for book rows; bid_prices[0] is the best bid. |
bid_sizes | list<float> | null | Bid size at each price level for book rows. |
best_ask | float | null | Best ask after a price change. |
best_bid | float | null | Best bid after a price change. |
pc_price | float | null | Changed price level. |
pc_size | float | null | New aggregate size at the updated price level. |
pc_side | string | null | Order book side of the updated price level, BUY or SELL. |
new_tick_size | float | null | New minimum tick size when announced by the feed. |
winning_outcome | string | null | Winning outcome when announced by the feed. |
