> Documentation index: https://pmdata.dev/llms.txt. Full docs in one file: https://pmdata.dev/llms-full.txt

# L2

Source: https://pmdata.dev/docs/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` ·

## 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`.

| Field | Type | Description |
| --- | --- | --- |
| `market_slug` | `string` | Polymarket `market_slug`. |
| `timestamp` | `timestamp[us]` | Polymarket event timestamp. |
| `local_timestamp` | `timestamp[us]` | PMData receive timestamp. |
| `event_type` | `string` | `book`, `price_change`, `market_resolved`, or `tick_size_change`. |
| `ask_prices` | `list<float> \| null` | Ask prices; index 0 is the best ask. Source: `book` event. |
| `ask_sizes` | `list<float> \| null` | Ask size at each price in `ask_prices`. Source: `book` event. |
| `bid_prices` | `list<float> \| null` | Bid prices; index 0 is the best bid. Source: `book` event. |
| `bid_sizes` | `list<float> \| null` | Bid size at each price in `bid_prices`. Source: `book` event. |
| `best_ask` | `float \| null` | Best ask. Source: `price_change` event. |
| `best_bid` | `float \| null` | Best bid. Source: `price_change` event. |
| `pc_price` | `float \| null` | Updated price level. Source: `price_change` event. |
| `pc_size` | `float \| null` | New aggregate size at `pc_price`. Zero removes the level. Source: `price_change` event. |
| `pc_side` | `string \| null` | Updated side: `BUY` or `SELL`. Source: `price_change` event. |
| `new_tick_size` | `float \| null` | New minimum tick size. Source: `tick_size_change` event. |
| `winning_outcome` | `string \| null` | Winning 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_slug | event_type | ask_prices | ask_sizes | bid_prices | bid_sizes |
| --- | --- | --- | --- | --- | --- |
| `btc-updown-5m-1784332800` | `book` | `[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_slug | event_type | pc_price | pc_size | pc_side | best_ask | best_bid |
| --- | --- | ---: | ---: | --- | ---: | ---: |
| `btc-updown-5m-1784332800` | `price_change` | 0.11 | 726 | `BUY` | 0.51 | 0.50 |
