Implement an in-memory order book for one instrument in C++, with add, cancel by order id, quantity at a level and depth from the best price.
Unlock detailed company stats for this questionUpgrade
Implement an in-memory order book for one instrument in C++: orders arrive with id, side, price and quantity; keep orders at each price in arrival order; maintain aggregate resting quantity per level; support add, level_quantity, depth (best price first) and cancel by order id without disturbing other orders.
Community answers
No answers contributed by the community yet.
Related questions
Implement an order book across exchanges with add(exchange, price, quantity, side), the best bid and ask on one exchange, and the best bid and ask across all of them.Implement an order book with three functions: insert an order, delete an order, and return the total volume resting at a given price level.Design, then implement, a pro-rata order book, in which fills at a price level are shared in proportion to resting order size instead of by time priority.Related courses

Course
