Documentation
The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.
GET accounts/:id/orders[/:orderId]
Retrieves orders for specified account
Request parameters
Parameter | Type | Description |
---|---|---|
id | String | Account number. Can occur in the 'location' header only. |
startTime | DateTime | Start of time range in ISO format. By default – start of today, 12:00am. |
endTime | DateTime | End of time range in ISO format. By default – end of today, 11:59pm |
stateFilter | Enum | All, Open, Closed – retrieve all, active or closed orders. |
orderId | Integer | Retrieve single order details. |
Response properties
Property | Type | Description |
---|---|---|
orders | Complex | List of order records. |
Order | ||
id | Integer | Internal order identifier. |
symbol | String | Symbol that follows Questrade symbology (e.g., "TD.TO"). |
symbolId | Integer | Internal symbol identifier. |
totalQuantity | Integer | Total quantity of the order. |
openQuantity | Integer | Unfilled portion of the order quantity. |
filledQuantity | Integer | Filled portion of the order quantity. |
canceledQuantity | Integer | Unfilled portion of the order quantity after cancellation. |
side | Integer | Client view of the order side (e.g., "Buy-To-Open"). See Order Side section for all allowed values.
|
orderType | Enumeration | Order price type (e.g., "Market"). See Order Type section for all allowed values.
|
limitPrice | Integer | Limit price. |
stopPrice | Double | Stop price. |
isAllOrNone | Boolean | Specifies all-or-none special instruction. |
isAnonymous | Boolean | Specifies Anonymous special instruction. |
icebergQuantity | Integer | Specifies Iceberg special instruction. |
minQuantity | Integer | Specifies Minimum special instruction. |
avgExecPrice | Double | Average price of all executions received for this order. |
lastExecPrice | Double | Price of the last execution received for the order in question. |
source | Enumeration | |
timeInForce | Enumeration | See Order
Time In Force section for all allowed values. |
gtdDate | DateTime | Good-Till-Date marker and date parameter |
state | Enumeration | See Order State section for all allowed values. |
clientReasonStr | String | Human readable order rejection reason message. |
chainId | Integer | Internal identifier of a chain to which the order belongs. |
creationTime | DateTime | Order creation time. |
updateTime | DateTime | Time of the last update. |
notes | String | Notes that may have been manually added by Questrade staff. |
primaryRoute | Enumeration | |
secondaryRoute | Enumeration | |
orderRoute | Enumeration | Order route name. |
venueHoldingOrder | Enumeration | Venue where non-marketable portion of the order was booked. |
commissionCharged | Double | Total commission amount charged for this order. |
exchangeOrderId | String | Identifier assigned to this order by exchange where it was routed. |
isSignificantShareholder | Boolean | Whether user that placed the order is a significant shareholder. |
isInsider | Boolean | Whether user that placed the order is an insider. |
isLimitOffsetInDollar | Boolean | Whether limit offset is specified in dollars (vs. percent). |
userId | Integer | Internal identifier of user that placed the order. |
placementCommission | Double | Commission for placing the order via the Trade Desk over the phone. |
legs | Complex | List of OrderLeg elements. |
OrderLeg | Complex | |
strategyType | Enumeration | Multi-leg strategy to which the order belongs. |
triggerStopPrice | Double | Stop price at which order was triggered. |
orderGroupId | Integer | Internal identifier of the order group. |
orderClass | Enumeration | Bracket Order class. Primary, Profit or Loss. |
Sample request
GET https://api01.iq.questrade.com/v1/accounts/26598145/orders
Sample 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 }, ... ] }