OrderBook++

High-performance C++ order matching engine with Python bindings

OrderBook++ Fancy Image

Overview

OrderBook++ is a custom-built C++ order matching engine designed for speed, scalability, and seamless Python integration. It supports market, limit, and cancel orders with efficient trade execution and history tracking. The project also exposes Python bindings via pybind11 for interactive experimentation, analytics, and visualization. The engine serves as a foundation for simulating electronic markets and developing algorithmic trading strategies.

Pipeline

1. Initialize order book with custom data structures
2. Process market and limit orders
3. Match orders using price-time priority
4. Record trades and update order book state
5. Expose functionality to Python via pybind11 for analysis and visualization

Design & Implementation

The system is implemented in C++ with optimization for low-latency order matching using custom data structures. It includes unit tests with Google Test, performance benchmarks, and pybind11 Python bindings for integration with data science workflows. Python scripts provide visualization and strategy backtesting on top of the engine.

Features

• Market, limit, and cancel order support
• Price-time priority order matching
• Trade history tracking
• Python bindings via pybind11
• Benchmark tests and visualization utilities

Tech. Stack

C++17, pybind11, CMake, Google Test, Python (visualization & demos), Performance Benchmarking

Links

GitHub Repository

← Back to Projects