A high-performance C++ orderbook implementation supporting multiple order types and matching algorithms.
-
Multiple order types support:
- Good Till Cancel (GTC)
- Fill And Kill (FAK)
- Fill Or Kill (FOK)
- Good For Day (GFD)
- Market Orders
-
Thread-safe operations with mutex protection
-
Automatic pruning of Good For Day orders at market close (16:00)
-
Price-time priority matching algorithm
-
Support for both buy and sell orders
-
Real-time level data tracking
-
Order modification capabilities
Orders that remain in the book until explicitly cancelled or fully matched.
Orders that get filled for available quantity and cancel remaining amount.
Orders that must be filled completely or cancelled entirely.
Orders that automatically get cancelled at market close (16:00).
Orders that match at the best available price.
The implementation consists of several key components:
- Orderbook: Main matching engine implementation
- Order: Base order representation
- Trade: Matched trade information
- LevelInfo: Price level aggregation