Expand description
L2 Matching Engine - Realistic order matching with queue position modeling
Provides accurate L2 order matching simulation including:
- FIFO queue position tracking
- Partial fill support
- Realistic latency simulation
- Multiple queue models (RiskAverse, Probabilistic, L3FIFO)
§Lock Ordering Convention
IMPORTANT: To prevent deadlocks, always acquire locks in the following order:
- order_map
- bid_orders or ask_orders
Never acquire bid_orders/ask_orders before order_map when both are needed.
Structs§
- Conservative
Params - Conservative execution parameters
- Execution
- Order execution result
- Market
Impact - Market impact model for limit orders
- Matching
Engine - L2 Matching Engine with const generic order queue sizing
- Order
- Order information for matching
Enums§
- Order
Side - Order side
- Order
Type - Order type
- Queue
Model - Queue model types
- Queue
Position - Queue position information
- Time
InForce - Time in force
Type Aliases§
- Default
Matching Engine - Default matching engine with 8 orders per price level
- Matching
Engine4 - Matching engine with 4 orders per price level (low liquidity)
- Matching
Engine16 - Matching engine with 16 orders per price level (medium liquidity)
- Matching
Engine32 - Matching engine with 32 orders per price level (high liquidity)