recorded
SYNTH
NASDAQ ITCH 5.0 · reconstructed in C++
-
spread - · mid -

A replay of the hft-orderbook engine reconstructing a synthetic ITCH session. Pass ?ws=ws://host:port to watch a local wsbook live. · source ↗

Order book · L2

pricesize
-

Signals

micro-price-
spread-
last trade-
VWAP-
volume-
imbalance-

mid · session

Cumulative depth bidsasks

---
frame 0

What you are looking at

This page is a view of the hft-orderbook C++ engine reconstructing a NASDAQ TotalView-ITCH 5.0 limit-order book. ITCH is the exchange's order-by-order market-data feed: every add, execute, cancel, delete and replace carries an 8-byte order reference, and the exchange has already matched. So the engine is a reconstructor, not a matching engine: it applies each message to an O(1) order-reference map to rebuild the resting book, then derives signals from it.

ITCH 5.0 feeddecode (manual big-endian)O(1) order-ref bookmetrics + trade tapeJSON snapshotthis view
Order book - L2
The resting limit orders: bids (green) below, asks (red) above, with the size at each price level (bar length is size relative to the deepest visible level). The top row on each side is the best bid / best ask, and the strip between them is the inside and its spread. A real book is never crossed: the best bid sits strictly below the best ask.
Cumulative depth
The same book as a depth-of-market chart - cumulative resting size against price. Bids accumulate to the left of the mid and asks to the right; the gap in the middle is the spread. Taller, steeper walls mean more liquidity stacked near the touch.
Signals
Micro-price is a size-weighted fair value that leans toward the heavier side (a classic short-horizon predictor). Spread is best ask minus best bid, in basis points. Imbalance is the relative resting size, (bid - ask) / (bid + ask), a short-term directional read - the gauge fills green when bids dominate, red when asks do. Last / VWAP / volume come from the trade tape (the executions), tracked separately from the resting book.

The decode, reconstruction, metrics and streaming all run in C++ (a lock-free pipeline, sub-microsecond per message); the browser is only the view. The session shown here is synthetic - ITCH messages produced by the repo's gencap generator, run through the real engine, captured with wsbook --dump and replayed in a loop (real BinaryFILE captures are exercised in the benchmark suite). Append ?ws=ws://host:port to drive this same view live from a local wsbook over a dependency-free WebSocket (hand-rolled SHA-1 + RFC-6455).