Data Schemas
L2
Schema for Kalshi order book snapshots and deltas.
Each row is a Kalshi order book snapshot or delta from the orderbook_delta channel. One file per market per UTC day.
Data type: l2 · Download sample ↗
Schema
| Field | Type | Description |
|---|---|---|
market_ticker | string | Kalshi market ticker. |
timestamp | timestamp[us] | null | Kalshi timestamp (ts_ms) of a delta. Null for source snapshots, which carry no timestamp. 00:00 UTC on the synthesized SOD and EOD rows. |
local_timestamp | timestamp[us] | KacData receive timestamp. 00:00 UTC on the synthesized SOD and EOD rows. |
event_type | string | orderbook_snapshot or orderbook_delta. |
yes_prices | list<decimal(18,4)> | null | YES bid prices; index 0 is the best bid. Snapshot rows only. |
yes_sizes | list<decimal(18,4)> | null | Size at each price in yes_prices. Snapshot rows only. |
no_prices | list<decimal(18,4)> | null | NO bid prices; index 0 is the best bid. A NO bid at p is a YES ask at 1 − p. Snapshot rows only. |
no_sizes | list<decimal(18,4)> | null | Size at each price in no_prices. Snapshot rows only. |
delta_price | decimal(18,4) | null | Price level being updated. Delta rows only. |
delta_size | decimal(18,4) | null | Signed change to the size at delta_price. Delta rows only. |
delta_side | string | null | yes or no: the side being updated. Delta rows only. |
Replaying the order book
Replay in file order, from the first row. Do not re-sort by timestamp.
- The first row of each file is the start-of-day (SOD) book, equal to the previous day's end-of-day book. The last row is the end-of-day (EOD) book. Both are
orderbook_snapshotrows whosetimestampandlocal_timestampequal a UTC day boundary; every other row is a Kalshi message. - On an
orderbook_snapshotrow (source or synthesized), replace the whole book. - On an
orderbook_deltarow, adddelta_sizeto the level atdelta_priceondelta_side. Remove the level when the result is ≤ 0. - A source snapshot with all four lists empty means the market has expired: clear the book.
A market with no earlier book (recording had not yet received a snapshot for it, and there was no EOD the day before) has no SOD row; its deltas before the first snapshot are kept. A market that still has no book at the end of the day has no EOD row.
Example data
orderbook_snapshot row:
| market_ticker | event_type | yes_prices | yes_sizes | no_prices | no_sizes |
|---|---|---|---|---|---|
KXHIGHNY-26OCT15-B68.5 | orderbook_snapshot | [0.4100, 0.4000, …] | [250.00, 1200.00, …] | [0.5700, 0.5600, …] | [310.00, 800.00, …] |
orderbook_delta row:
| market_ticker | event_type | delta_price | delta_size | delta_side |
|---|---|---|---|---|
KXHIGHNY-26OCT15-B68.5 | orderbook_delta | 0.4200 | -40.00 | yes |
Example rows are illustrative(占位,待改).