ITCH Order Book
NASDAQ ITCH 5.0 feed handler and order book / Aug 2026 – present
C++20 · NASDAQ ITCH 5.0 · MoldUDP64 · kernel bypass
numbers
9.3M msg/sreplay, single thread
290 nsp50 packet → callback
1.3 µsp99 packet → callback
2.6×over baseline
order book
- Replayed a 39.5 million message capture at 9.3 million msg/sec single-threaded via an open-addressing order index, slab pool and flat price-level array; each change measured against byte-identical golden output.
feed replay
- Wrote a MoldUDP64 replayer with fixed-origin rate control (42 ns median jitter at 100 kHz) and deterministic loss injection, plus a receiver that detects every injected sequence gap by exact range.
- Validated framing by hand-decoding a pcap.
receive paths
Three implementations behind one interface:
| path | built against | notes |
|---|---|---|
| recvfrom | sockets | blocking baseline |
| io_uring | raw kernel ABI, hand-mapped rings | multishot, buffer ring, SQPOLL; multishot took 48,000 packets on one syscall |
| AF_XDP | raw UAPI | kernel bypass |
latency
- Broke down latency by component: decode 30 ns, book update 150 ns.
- Applied a coordinated-omission correction that exposed a 714 µs stall previously reported as 35 µs.