Limit Order Book / matching engine
A C++20 price-time-priority matching engine compiled to WebAssembly. Switch between synthetic order flow and a recorded NASDAQ ITCH replay; both run entirely in your browser.
Two sources, one engine. Synthetic generates a stream of orders (resting quotes on both sides, plus aggressive orders that cross the spread) and matches them live. Real · AAPL replays a recorded slice of NASDAQ TotalView-ITCH, rebuilding Apple's actual book from that session. Both run entirely in WebAssembly and update every frame:
- Ladder resting limit orders by price. Asks (sells) sit above the mid, bids (buys) below; the bar shows size relative to the deepest level. The best bid and best ask meet at the spread.
- Tape executions as they print, newest on top. A trade fires whenever an incoming order crosses the spread and matches resting size at the maker's price.
- Stats live top of book, the count of resting orders, cumulative matches, and how many orders the engine is processing per second. Drag Speed to push it harder.
Best bid—
Best ask—
Spread—
Resting orders—
Orders matched—
Throughput—
PriceSizeDepth
—
mid
PriceSizeDepth