No description
  • C++ 78.4%
  • Nix 19%
  • Python 2%
  • Shell 0.6%
Find a file
Mikkel Thestrup baea5d402b
All checks were successful
CI / test (push) Successful in 5s
fix: refactor order dispatch and fix match_order lifetime
- 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::`
2026-07-25 00:12:04 +02:00
.forgejo/workflows Fix nix checks 2026-07-24 22:39:18 +02:00
docs Added new partial benchmarks 2026-06-08 14:15:28 +02:00
proto Add Watch RPC for server-streaming book snapshots 2026-06-13 20:27:05 +02:00
scripts Add thread-safe Orderbook and gRPC service 2026-06-12 22:08:44 +02:00
src fix: refactor order dispatch and fix match_order lifetime 2026-07-25 00:12:04 +02:00
.clang-format Initial commit 2026-06-02 14:31:49 +02:00
.clang-tidy added clang-tidy 2026-06-29 16:12:17 +02:00
.envrc added direnv 2026-07-18 14:51:47 +02:00
.gitignore added direnv 2026-07-18 14:51:47 +02:00
flake.lock Initial commit 2026-06-02 14:31:49 +02:00
flake.nix fix: refactor order dispatch and fix match_order lifetime 2026-07-25 00:12:04 +02:00
README.md Added benchmarks to readme 2026-06-08 09:56:28 +02:00

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.

Orderbook Benchmarks