Production-grade matching engine for algorithmic and high-frequency trading. Zero heap allocations. Zero virtual dispatch. Full Python API.
Code
Architecture
Performance
Single-threaded, x86-64, GCC 13.3 -O3 -march=native. 100,000 samples. Includes steady_clock overhead (~15 ns).
| Operation | p50 | p95 | p99 | Notes |
|---|---|---|---|---|
| BBO query | 31 ns | 32 ns | 33 ns | best_bid() + best_ask() |
| Cancel order | 82 ns | 167 ns | 204 ns | O(1) hash map + intrusive list |
| Market order (1 fill) | 108 ns | 213 ns | 270 ns | match + emit trade event |
| Add limit (100 resting) | 111 ns | 166 ns | 204 ns | no match, rests in book |
| Depth snapshot (10 levels) | ~180 ns | — | — | O(depth) map iteration |
Run ./bench_latency on your own hardware to reproduce.
Pricing
No subscriptions. No seats. Buy once, use forever. Includes 12 months of updates.
FAQ