Documentation
The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.
REST operations
GET accounts/:id/orders[/:orderId]
Retrieves orders for specified account
Request parameters
| Parameter | Type | Description |
|---|---|---|
| Parameterid | TypeString | DescriptionAccount number. Can occur in the 'location' header only. |
| ParameterstartTime | TypeDateTime | DescriptionStart of time range in ISO format. By default – start of today, 12:00am. |
| ParameterendTime | TypeDateTime | DescriptionEnd of time range in ISO format. By default – end of today, 11:59pm |
| ParameterstateFilter | TypeEnum | DescriptionAll, Open, Closed – retrieve all, active or closed orders. |
| ParameterorderId | TypeInteger | DescriptionRetrieve single order details. |
Response properties
| Property | Type | Description |
|---|---|---|
| Propertyorders | TypeComplex | DescriptionList of order records. |
| PropertyNested property, level 2. Order | Type | Description |
| PropertyNested property, level 3. id | TypeInteger | DescriptionInternal order identifier. |
| PropertyNested property, level 3. symbol | TypeString | DescriptionSymbol that follows Questrade symbology (e.g., "TD.TO"). |
| PropertyNested property, level 3. symbolId | TypeInteger | DescriptionInternal symbol identifier. |
| PropertyNested property, level 3. totalQuantity | TypeInteger | DescriptionTotal quantity of the order. |
| PropertyNested property, level 3. openQuantity | TypeInteger | DescriptionUnfilled portion of the order quantity. |
| PropertyNested property, level 3. filledQuantity | TypeInteger | DescriptionFilled portion of the order quantity. |
| PropertyNested property, level 3. canceledQuantity | TypeInteger | DescriptionUnfilled portion of the order quantity after cancellation. |
| PropertyNested property, level 3. side | TypeInteger | DescriptionClient view of the order side (e.g., "Buy-To-Open"). See Order Side section for all allowed values. |
| PropertyNested property, level 3. orderType | TypeEnumeration | DescriptionOrder price type (e.g., "Market"). See Order Type section for all allowed values. |
| PropertyNested property, level 3. limitPrice | TypeInteger | DescriptionLimit price. |
| PropertyNested property, level 3. stopPrice | TypeDouble | DescriptionStop price. |
| PropertyNested property, level 3. isAllOrNone | TypeBoolean | DescriptionSpecifies all-or-none special instruction. |
| PropertyNested property, level 3. isAnonymous | TypeBoolean | DescriptionSpecifies Anonymous special instruction. |
| PropertyNested property, level 3. icebergQuantity | TypeInteger | DescriptionSpecifies Iceberg special instruction. |
| PropertyNested property, level 3. minQuantity | TypeInteger | DescriptionSpecifies Minimum special instruction. |
| PropertyNested property, level 3. avgExecPrice | TypeDouble | DescriptionAverage price of all executions received for this order. |
| PropertyNested property, level 3. lastExecPrice | TypeDouble | DescriptionPrice of the last execution received for the order in question. |
| PropertyNested property, level 3. source | TypeEnumeration | Description |
| PropertyNested property, level 3. timeInForce | TypeEnumeration | DescriptionSee Order Time In Force section for all allowed values. |
| PropertyNested property, level 3. gtdDate | TypeDateTime | DescriptionGood-Till-Date marker and date parameter |
| PropertyNested property, level 3. state | TypeEnumeration | DescriptionSee Order State section for all allowed values. |
| PropertyNested property, level 3. clientReasonStr | TypeString | DescriptionHuman readable order rejection reason message. |
| PropertyNested property, level 3. chainId | TypeInteger | DescriptionInternal identifier of a chain to which the order belongs. |
| PropertyNested property, level 3. creationTime | TypeDateTime | DescriptionOrder creation time. |
| PropertyNested property, level 3. updateTime | TypeDateTime | DescriptionTime of the last update. |
| PropertyNested property, level 3. notes | TypeString | DescriptionNotes that may have been manually added by Questrade staff. |
| PropertyNested property, level 3. primaryRoute | TypeEnumeration | Description |
| PropertyNested property, level 3. secondaryRoute | TypeEnumeration | Description |
| PropertyNested property, level 3. orderRoute | TypeEnumeration | DescriptionOrder route name. |
| PropertyNested property, level 3. venueHoldingOrder | TypeEnumeration | DescriptionVenue where non-marketable portion of the order was booked. |
| PropertyNested property, level 3. commissionCharged | TypeDouble | DescriptionTotal commission amount charged for this order. |
| PropertyNested property, level 3. exchangeOrderId | TypeString | DescriptionIdentifier assigned to this order by exchange where it was routed. |
| PropertyNested property, level 3. isSignificantShareholder | TypeBoolean | DescriptionWhether user that placed the order is a significant shareholder. |
| PropertyNested property, level 3. isInsider | TypeBoolean | DescriptionWhether user that placed the order is an insider. |
| PropertyNested property, level 3. isLimitOffsetInDollar | TypeBoolean | DescriptionWhether limit offset is specified in dollars (vs. percent). |
| PropertyNested property, level 3. userId | TypeInteger | DescriptionInternal identifier of user that placed the order. |
| PropertyNested property, level 3. placementCommission | TypeDouble | DescriptionCommission for placing the order via the Trade Desk over the phone. |
| PropertyNested property, level 3. legs | TypeComplex | DescriptionList of OrderLeg elements. |
| PropertyNested property, level 3. OrderLeg | TypeComplex | Description |
| PropertyNested property, level 3. strategyType | TypeEnumeration | DescriptionMulti-leg strategy to which the order belongs. |
| PropertyNested property, level 3. triggerStopPrice | TypeDouble | DescriptionStop price at which order was triggered. |
| PropertyNested property, level 3. orderGroupId | TypeInteger | DescriptionInternal identifier of the order group. |
| PropertyNested property, level 3. orderClass | TypeEnumeration | DescriptionBracket Order class. Primary, Profit or Loss. |
Sample request
GET https://api01.iq.questrade.com/v1/accounts/26598145/ordersSample request
GET https://api01.iq.questrade.com/v1/accounts/26598145/orders?ids=173577870,...Sample JSON response
{
"orders": [
{
"id": 173577870,
"symbol": "AAPL",
"symbolId": 8049,
"totalQuantity": 100,
"openQuantity": 100,
"filledQuantity": 0,
"canceledQuantity": 0,
"side": "Buy",
"type": "Limit",
"limitPrice": 500.95,
"stopPrice": null,
"isAllOrNone": false,
"isAnonymous": false,
"icebergQty": null,
"minQuantity": null,
"avgExecPrice": null,
"lastExecPrice": null,
"source": "TradingAPI",
"timeInForce": "Day",
"gtdDate": null,
"state": "Canceled",
"clientReasonStr": "",
"chainId": 173577870,
"creationTime": 2014-10-23T20:03:41.636000-04:00,
"updateTime": 2014-10-23T20:03:42.890000-04:00,
"notes": "",
"primaryRoute": "AUTO",
"secondaryRoute": "",
"orderRoute": "LAMP",
"venueHoldingOrder": "",
"comissionCharged": 0,
"exchangeOrderId": "XS173577870",
"isSignificantShareHolder": false,
"isInsider": false,
"isLimitOffsetInDollar": false,
"userId": 3000124,
"placementCommission": null,
"legs": [],
"strategyType": "SingleLeg",
"triggerStopPrice": null,
"orderGroupId": 0,
"orderClass": null,
"mainChainId": 0
},
...
]
}Already a Questrade client?
Create your first application using your Questrade account.
Integrate your application with Questrade API
Support
If you are using an api app developed by a third party, you are required to read, understand and accept the end-user license agreement for application program interface. If you are utilizing api access for an api-enabled app you built, you are required to read, understand and accept the Questrade personal application program interface ("api") license agreement ("license agreement"). This agreement can be found below. You may be bound by both agreements.


