About this question

Order Book Snapshot Builder

Medium · architecture & logic · Quant Developer interview question · c++, data structures, hash table, binary search tree, design

An order book tracks the resting buy (bid) and sell (ask) orders for a financial instrument by processing a continuous stream of market data messages. Maintaining an accurate, low-latency representation of this limit order book through add, modify, and delete operations is a fundamental architectural component of modern quantitative trading systems. Task Implement an OrderBook class that maintains a limit order book and generates snapshots of the top 5 bid and ask levels. The driver function pr