ApexEngine is a next-generation, high-performance, lock-free matching engine, designed for ultra-low latency trading systems and scalable exchange infrastructures.
Reach the Apex of Matching Performance.
Requires Rust 1.86 stable.
- Lock-free Order Book
- Limit and Market Orders
- Thread-safe Multi-Core Scalability
- Priority-based Matching
- Slippage Tolerance
- Comprehensive Matching Strategies
- High Performance Benchmarks
- Memory Efficient
- Skiplist-based concurrent order book
- Safe atomic state transitions for lifecycle
- Market orders with optional slippage tolerance
Benchmark ApexEngine's matching performance with the following scenarios:
cargo bench
Scenario | Description |
---|---|
match_orders 10k |
Insert and match 10,000 limit orders |
multi-thread insert/cancel/match TPS |
Concurrent insert/cancel/match |
use matching_engine::prelude::*;
use matching_engine::DefaultMatchingEngine;
use std::sync::Arc;
use std::sync::atomic::AtomicU128;
let syncer = Arc::new(EmptyOrderBookSyncer {});
let id = Arc::new(AtomicU128::new(1));
let book = Arc::new(DefaultOrderBook::new(id, syncer));
let engine = DefaultMatchingEngine::new(book);
let mut order = make_limit_order(1, Side::Buy, 1000, 10, 1000000);
engine.create_order( & mut order).unwrap();
engine.match_orders();
- Iceberg Orders
- Advanced Order Types
- Multi-Symbol Support
- Persistent Storage
Because every microsecond matters.
ApexEngine is engineered for ultra-high performance, deterministic matching, and scalable concurrency — without
sacrificing safety.
Contributions, issues and pull requests are welcome!
This project is dual-licensed under:
at your option.
You may choose either license when using this software.