// the find
dgtony/orderbook-rs
Basic order matching engine written in Rust
A single-threaded order book engine written in Rust that handles limit/market orders, amending, cancellation, and partial fills. Built explicitly as a learning project for Rust and trading system internals — the author says so upfront. Good starting point for understanding how a price-time priority order book works, not a production component.
Clean separation between domain types, order queues, matching logic, and validation across distinct modules. The reactive design — consume an order, return a vector of events — is the right interface shape for embedding in a larger system. Supports the core operations (limit, market, amend, cancel, partial fill) that any real book needs. Rust's ownership model enforces the kind of discipline that financial code actually benefits from.
Abandoned since April 2018 — eight years of no commits means no async, no multi-book coordination, and none of the Rust ecosystem improvements since 1.x. Uses f64 for prices and quantities, which is a serious problem: floating-point arithmetic in financial systems causes matching errors and is how you get lawsuits. No persistence, no order ID sequencing across restarts, and no benchmark suite — so you have no idea how it performs under load. The single-currency-pair, single-threaded model means you'd have to design the multi-book layer yourself from scratch.