The following sections describe the order lifecycle as well as the order routing capabilities of the IQ platform that the Questrade APIs allow you to connect to.
IQ order lifecycle
The IQ order lifecycle explains the different states in which an order may exist once it is placed, as well as the possible transitions between the order states. You need to familiarize yourself with the different order states to understand the responses you may receive when you place an order using the Questrade API.
Figure 1: Lifecycle of an order in the IQ platform.
Note: Figure 1 does not show every single transition for the sake of readability.
On IQ, route is defined as the destination where the order is sent for execution. Additionally, route is further divided into two categories: primary and secondary.
The primary route is the trading venue that Questrade clients can directly send orders to (for example, to listing exchanges like NYSE, an ECN like ATG, or a black-box execution venue like MNGD). The primary route eliminates the need to go through a Smart Order Route (SOR).
The secondary route on IQ only serves as a preferred destination for excess liquidity. An order to a secondary route on IQ always goes through a SOR, where the nationwide liquidity is examined (for example, a limit order for the same security sent to all trading venues) to obtain executions that are attractive in price (for example, the lowest priced sell orders for the same security first). If the nationwide liquidity is not found, a fraction of the order remains unfilled as the SOR sends the remainder to the preferred destination that the client or the IQ servers selected.
Note: due to the difference in securities law in the U.S. and in Canada, only U.S. routes can act as primary routes. As per guidelines set by IIROC, for Canadian routes, all orders are sent by default through the SOR by selecting ?auto? as the default selection on the IQ platform.
The diagram below illustrates the possible paths of client orders through IQ to the supported trading venues:
Figure 2 - Questrade IQ trading platform to market connectivity