A high-performance, real-time order book created in C++ and a simulator with a web interface created in Python.
Live demo at hft-engine.onrender.com
Note: The demo takes approximately 30 seconds to load on first visit due to Render's cold start policy.
- Simulated market generated using jump diffusion price modeling and orders using the Hawkes process
- Real-time order book, price chart, and trade tape visualization
- Shared and unique locks used to allow concurrent reads and thread-safe writes in order book.
-
Market Orders
- Immediate execution at the best available price
- No price specified, takes liquidity from the order book
-
Limit Orders
- Execution at a specified price or better
- Adds liquidity to the order book
- Can be partially filled
-
Iceberg Orders
- Large orders split into smaller visible portions
- Helps hide true order size
- Maintains a specified display size
-
TWAP (Time-Weighted Average Price) Orders
- Splits orders into equal slices over a specified duration
- Reduces market impact
- Configurable number of slices
-
Trickle Orders
- Random-sized slices with random time intervals
- More natural order flow appearance
- Configurable min/max slice sizes and pause times