Low Latency C++ Orderbook
This is an implementation of a Limit Orderbook in C++ using a Price-Time matching algorithm. In the tests folder is the testing framework to make sure the features (addOrder, updateOrder, deleteOrder) works across various examples. In the inputs folder is another function that enables to user to specify a txt file to run the commands for simulating orders. Moreover, a Python wrapper is provided from Pybind11 for those who wish to use Python instead. The OrderBook class was developed with an Orders Class, a PriceLevel Class, and the main OrderBook class. The Orders class contains separate information conveying volume, id, side, and price. The PriceLevel class contains information on all of the orders in its existing price, sorted by time, and the total volume. Finally, the OrderBook class contains two main data structures. First, there is a map that links order ids to the Order Class. Second, there is a vector of PriceLevel objects sorted by price for both the bids and the asks. This ensures that the add, delete, and update function are all O(LogN) operations.