Getting orders information
The IConnector events related to orders listed below:
Transactions (orders registration, replacement or cancelling) are sent in asynchronous mode. Asynchronous mode allows the trading program not to wait for transaction delivery confirmation by the exchange and continues to work further. That reduces program wait time and increases the speed of response to the market situation changes.
To find out in the program when the exchange has assigned the OrderId to the order, you need to subscribe for the IConnectorOrdersChanged event (or the IConnectorStopOrdersChanged for stop orders). To determine the registration failed the IConnectorOrdersRegisterFailed event is used (or the IConnectorStopOrdersRegisterFailed for stop orders).
If at the start of the application the previously registered orders have been passed from the connector, they all passed through the NewOrders events, regardless of their state (except the Failed state). This is because the NewOrders event shows the new orders receiving in the program, not the event of order successful registration.