TOME – TOY ORDER MATCHING ENGINE
Minimal, correct C++17 limit order book implementation with price-time priority matching and integer ticks.
Overview
TOME (Tiny Order Matching Engine) is a minimal, correct C++17 limit order book implementation. It is designed to demonstrate price-time priority matching (highest bid / lowest ask first, FIFO within price level) using a single-threaded matching architecture. Key features include: - Efficient price-time priority sorting using std::map mapping integer tick price levels to double-ended queues of orders. - Full support for both LIMIT and MARKET order paths, order cancellations, and partial fills. - Real-time trade execution history logging and order book state snapshots. - Single-threaded matching engine design utilizing strict integer tick arithmetic to completely eliminate floating-point precision issues.
System Demonstration


