Limit order book engine · session replay
One full NASDAQ trading day of AAPL, replayed through the book
AAPL · Fri 2024-01-05
XNAS.ITCH · MBO (L3)
Databento · DBN v1 · 82 MB zstd
single thread · Apple silicon · clang -O3
Replay throughput — parse + full book reconstruction
—
—
Book update p50
—
per-event, steady_clock ¹
Book update p99.9
—
worst 0.1% of 4.77M events
Parse-only throughput
27.9 M rec/s
36 ns/record incl. zstd
Mean quoted spread
—
time-weighted, 09:30–16:00 ET
Mid price
every top-of-book change, 147,390 in session — hover or focus for the exact touch
View as table (per-minute OHLC of the mid)
Depth ladder
resting shares by price level
Bids
Asks
2 s heartbeat · touch is exact
View as table
Time & sales
every fill, live at the playhead · ▲ buyer-initiated, ▼ seller-initiated
View as table (last 200 at playhead)
Book-update latency
share of 4.77M events ¹
View as table
Message rate
MBO messages per minute · shaded = extended hours
View as table
Methodology & caveats
- ¹ Latency is the wall time of
Book::apply(event) measured per event with std::chrono::steady_clock, whose tick on Apple silicon is 41.67 ns (24 MHz) — values are quantized to that grid and include roughly one tick of timer overhead. Percentiles are over all 4,772,682 events.
- The playback is a faithful re-broadcast of the engine's recorded output: every top-of-book price change (millisecond-timestamped) and every fill are replayed exactly; only the ladder's interior levels refresh on a 2-second heartbeat. Speeds are market-time multipliers — the engine itself consumed the day in 0.42 s.
- This is the v0 price-level book: an order-ID hash map plus a sorted map of occupied price levels per side. Per-order FIFO queues and matching come next, so the metric reported is book-update latency, not order-to-fill.
- Data: Databento
XNAS.ITCH MBO (market-by-order) for AAPL on 2024-01-05, DBN-encoded. Parser record counts match the Python databento client exactly (2,258,537 adds · 2,279,209 cancels · 106,477 fills · 128,458 non-book trades). Trade direction in time & sales is inferred from the resting side of each fill.
- Regular trading hours are 09:30–16:00 ET; the replay loops over that window. The 16:00 spike in the message-rate chart is the closing cross.