Building order books from market data
In the previous section, we built the market data consumer component, which subscribes to the market data stream, synchronizes between the snapshot and incremental streams, and decodes the market data updates and publishes them to the trading engine component. The trading engine component then needs to process these market data updates and build a limited order book like the one that the matching engine builds, except this is a much more limited version of the matching engine’s order book. As a reminder, we discussed this in the chapter Designing Our Trading Ecosystem in the Designing a framework for low latency C++ trading algorithms section. One last thing to note is that we will re-use the design and code of the order book in the matching engine to create the order book in the client’s system. We will re-use the source code we built in the chapter Building the C++ Matching Engine in the Building the order book and matching orders...