How mayur-dambale/limit-order-book works
This repository is a C++ limit-order-book matching engine with companion sample-order generation and processing-time analysis. The main workflow creates a Book, feeds it order commands through OrderPipeline, dispatches market, limit, stop, and stop-limit operations to the book, and records timing data for visualization. The book uses price-level limits and FIFO orders, with AVL-based price trees and stop-order handling. The README documents these capabilities; several implementation details are unsampled, so the graph omits uncertain internal call relationships.
Main entry points: Book.cpp Matching book · OrderPipeline.cpp Order command pipeline · main.cpp Application entry · GenerateOrders.cpp Order data generator
Components 11
Matching runtime
- Application entry
main.cpp - Order command pipeline
Process_Orders/OrderPipeline.cpp - Matching book
Limit_Order_Book/Book.cpp - Price levels and trees
Limit_Order_Book/Limit.cpp - FIFO order records
Limit_Order_Book/Order.cpp
Order data
- Order data generator
Generate_Orders/GenerateOrders.cpp - Initial order sample
Generate_Orders/initialOrders.txt
Performance analysis
- Processing measurements
Process_Orders/OrderPipeline.cpp - Timing CSV
Process_Orders/order_processing_times.csv - Performance charts
Process_Orders/data_visualisation.py
Other components
- Run application
Connections 12
- Run application → Application entry: starts
README.md - Application entry → Matching book: creates
main.cpp - Application entry → Order command pipeline: processes orders
main.cpp - Order command pipeline → Matching book: dispatches commands
Process_Orders/OrderPipeline.cpp - Matching book → Price levels and trees: manages levels
Limit_Order_Book/Book.cpp - Matching book → FIFO order records: creates orders
Limit_Order_Book/Book.cpp - Price levels and trees → FIFO order records: links FIFO orders
Limit_Order_Book/Limit.cpp - Order data generator → Matching book: generates against
Generate_Orders/GenerateOrders.cpp - Order data generator → Initial order sample: writes sample
- Order command pipeline → Initial order sample: reads commands
- Order command pipeline → Timing CSV: writes timings
Process_Orders/OrderPipeline.cpp - Performance charts → Timing CSV: reads timings
Process_Orders/data_visualisation.py