{"repo":"timothewt/OrderBook","free":true,"listed":false,"github":"https://github.com/timothewt/OrderBook","clone":"git clone https://github.com/timothewt/OrderBook.git","description":"High-performance C++ Implementation of a Limit Order Book and a Matching Engine","language":"C++","stars":15,"topics":["hft","high-performance","orderbook","tick-data","trading"],"license":"MIT","category":"trading","readme_excerpt":"Limit Order Book & Matching Engine This repository contains the C++ implementation of a high-performance Limit Order Book and its Matching Engine. Overview The Limit Order Book is designed using a combination of data structures to optimize order insertion, deletion, and matching: Architecture - Data Structures : Orders are stored in a doubly linked-list structure, where each list represents a price level. Price levels are managed using Red-Black Trees implemented via std::set in C++, ensuring efficient insertion and deletion operations. - Order Format : Orders are added in the format ID, AgentID, Price, Volume , and deleted by their id ID . Performance To assess performance, the system was tested with 1,000,000 operations (place or delete orders), generated using a Python script. These operations were processed through a CSV parser and fed into the C++ program. - High-Performance : The system achieved a peak performance of 600,000 operations per second . Operations include order insertions, trades, and order deletions. Build Instructions Prerequisites - CMake 3.28 or higher - C++20 compatible compiler - Google Test (for running tests) Building the Project Running Tests Usage The program takes two command-line arguments: an input CSV file and an output CSV file. Input Format The input CSV file should contain operations in the following format: - PLACE : Add a new order (requires OrderID, AgentID, Side, Price, Volume) - Side: 0 = BUY, 1 = SELL - DELETE : Remove an order (requir","default_branch":null,"files":null,"tree":[],"storefront":"/r/timothewt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/timothewt/OrderBook/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}