- C++ 78.4%
- Nix 19%
- Python 2%
- Shell 0.6%
|
All checks were successful
CI / test (push) Successful in 5s
- Deduplicate bids/asks dispatch logic in the order book - Fix a dangling reference in `match_order` - Improve `add_order` APIs by using `const&` - Add the explicit `<cstdint>` include and qualify integer types with `std::` |
||
|---|---|---|
| .forgejo/workflows | ||
| docs | ||
| proto | ||
| scripts | ||
| src | ||
| .clang-format | ||
| .clang-tidy | ||
| .envrc | ||
| .gitignore | ||
| flake.lock | ||
| flake.nix | ||
| README.md | ||
Orderbook
A limit orderbook matching engine written in C++23.
Supports price-time priority matching, GoodTillCancel and FillAndKill order types, and order modification. Built with Nix and tested with GoogleTest.
Benchmark
The order book includes a benchmark suite built with Google Benchmark to evaluate the performance of core operations across varying book sizes (64 to 65,536 orders). The benchmarks measure order insertion, order cancellation, insert-and-match scenarios, market order execution, and full book sweeps.
Testing was performed on consumer desktop hardware (AMD Ryzen 5 5600X @ 4.65 GHz), providing a realistic indication of performance without specialized server-grade equipment. These benchmarks serve as a baseline for evaluating design choices, identifying bottlenecks, and tracking performance improvements over time.
