When an application submits a new order or changes an existing order, the TT Core SDK stores the request ID provided with the request. The request IDs are then passed back in the event callbacks (ExecutionReport::GetRequestId()) to allow developers to determine which order request that a given event is in response to. When an application submits a change request for an order, the TT Core SDK will immediately route the message to the exchange if no other change request is in flight.
If, however, there is another change request in flight, the TT Core SDK will queue the submitted change request as well as any further change requests for this order. Once a response for the in flight change request has been received, the TT Core SDK will conflate all request messages in the queue and route a single change request to the exchange. In other words, an application may not receive an order event for every request that it submits. The request ID can be used to detect when this happens.
For example, assume that the following order change messages were submitted prior to the application receiving the acknowledgment for the initial order submission.
Order 1: BUY 10 CME ZB-Mar18 @ 155’11 (Request ID = 1)
Order 1: Change price to 155’10 (Request ID = 2)
Order 1: Change price to 155’09 (Request ID = 3)
Order 1: Change quantity to 12 (Request ID = 4)
Order 1: Change price to 155’08 (Request ID = 5)
Order 1: Change price to 155’07 (Request ID = 6)
When the response is received for the initial order, a single message would be routed to the exchange with a quantity of 12 and a price of 155’07. And the application would receive one order event callback with request ID set to 6.