Processing Market Data and Sending Orders to the Exchange in C++
In this chapter, we will build the client’s C++ system that receives and processes market data updates from the trading exchange. We will also have to deal with creating and reading from UDP sockets, dealing with packet losses, etc. We will discuss the design of an order book on the client side to track the order book maintained at the trading exchange. We will also implement the C++ components needed to establish and maintain TCP connections to the trading exchange. We will also implement functionality to send orders to the exchange from the strategies and receive and process order responses.
In this chapter, we will cover the following topics:
- Subscribing to market data and decoding the market data protocol
- Building order books from market data
- Connecting to the exchange, sending order requests, and receiving responses