KacDataDocs
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

FieldTypeDescription
market_tickerstringKalshi market ticker.
timestamptimestamp[us] | nullKalshi 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_timestamptimestamp[us]KacData receive timestamp. 00:00 UTC on the synthesized SOD and EOD rows.
event_typestringorderbook_snapshot or orderbook_delta.
yes_priceslist<decimal(18,4)> | nullYES bid prices; index 0 is the best bid. Snapshot rows only.
yes_sizeslist<decimal(18,4)> | nullSize at each price in yes_prices. Snapshot rows only.
no_priceslist<decimal(18,4)> | nullNO bid prices; index 0 is the best bid. A NO bid at p is a YES ask at 1 − p. Snapshot rows only.
no_sizeslist<decimal(18,4)> | nullSize at each price in no_prices. Snapshot rows only.
delta_pricedecimal(18,4) | nullPrice level being updated. Delta rows only.
delta_sizedecimal(18,4) | nullSigned change to the size at delta_price. Delta rows only.
delta_sidestring | nullyes 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.

  1. 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_snapshot rows whose timestamp and local_timestamp equal a UTC day boundary; every other row is a Kalshi message.
  2. On an orderbook_snapshot row (source or synthesized), replace the whole book.
  3. On an orderbook_delta row, add delta_size to the level at delta_price on delta_side. Remove the level when the result is ≤ 0.
  4. 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_tickerevent_typeyes_pricesyes_sizesno_pricesno_sizes
KXHIGHNY-26OCT15-B68.5orderbook_snapshot[0.4100, 0.4000, …][250.00, 1200.00, …][0.5700, 0.5600, …][310.00, 800.00, …]

orderbook_delta row:

market_tickerevent_typedelta_pricedelta_sizedelta_side
KXHIGHNY-26OCT15-B68.5orderbook_delta0.4200-40.00yes

Example rows are illustrative(占位,待改).