{"repo":"mansoor-mamnoon/limit-order-book","free":true,"listed":false,"github":"https://github.com/mansoor-mamnoon/limit-order-book","clone":"git clone https://github.com/mansoor-mamnoon/limit-order-book.git","description":"High-performance limit order book engine with C++ core and Python SDK. Processes 20M+ msgs/sec with µs latency. Supports real crypto/equity data replay, spread/imbalance/impact analytics, and backtesting of VWAP, TWAP, POV, and market-making strategies with reproducible PnL and risk metrics.","language":"C++","stars":82,"topics":["cpp","algorithms","cache-optimization","concurrency","data-structures","high-performance","low-latency","parallel-computing","system-design","algorithmic-trading"],"license":null,"category":"trading","readme_excerpt":"Limit Order Book (LOB) Engine — C++20 A high-performance C++ matching engine that processes buy/sell orders with exchange-style semantics. Demonstrates low-latency hot-path design , cache-friendly data structures , reproducible benchmarking , and clean build/test tooling . --- 🧰 Tech Stack 🔤 Languages & Compilers ✅ Testing & CI/CD ⚡ Performance & Profiling 📂 Data & Processing 🐳 Containers & Release 📊 Visualization & Reporting 🖥️ Systems & Infra ⚡ Throughput: 20.7M msgs/sec 📊 Latency: p50=0.04µs, p99≈1µs ✅ Verified on real BTCUSDT BinanceUS data 🔎 Quick Highlights - Core engine ( BookCore ) : limit & market orders, cancels, modifies, FIFO per price level. - Order flags : IOC , FOK , POST ONLY , STP (self-trade prevention). - Persistence : binary snapshots (write/load) + replay tool. - Performance : slab memory pool, side-specialized matching (branch elimination), cache-hot best-level pointers, -fno-exceptions -fno-rtti . - Tooling : benchmark tool (percentiles + histogram CSVs), Catch2 unit tests, profiling toggle ( -fno-omit-frame-pointer -g ). --- 🧭 Architecture Engine flow Data layout Memory pool (slab allocator) --- 🗂️ Repository Layout --- 🛠️ Build & Run Configure & build (Release) CMake options - LOB BUILD TESTS (ON/OFF): build Catch2 tests. - LOB PROFILING (ON/OFF): add -fno-omit-frame-pointer -g for clean profiler stacks. - LOB ENABLE ASAN (Debug only): AddressSanitizer for tests/tools. - LOB LTO (Release only): optional -flto . Unit tests Benchmark (CSV + h","default_branch":null,"files":null,"tree":[],"storefront":"/r/mansoor-mamnoon","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mansoor-mamnoon/limit-order-book/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}