TOME

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

TOME – Toy Order Matching Engine asset 1
TOME – Toy Order Matching Engine asset 2
TOME – Toy Order Matching Engine asset 3

Tech Stack

C++Next.jsWebAssemblyReactTypeScript
StatusCompleted_2025
ArchitectureFull_Stack
CategorySystem_Dev