New and existing clients get up to $1,000 bonus at Questrade. New clients use code GET1000. Learn more.

(opens in a new tab)

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

Request parameters
ParameteridTypeStringDescriptionAccount number. Can occur in the 'location' header only.
ParameterstartTimeTypeDateTimeDescriptionStart of time range in ISO format. By default – start of today, 12:00am.
ParameterendTimeTypeDateTimeDescriptionEnd of time range in ISO format. By default – end of today, 11:59pm
ParameterstateFilterTypeEnumDescriptionAll, Open, Closed – retrieve all, active or closed orders.
ParameterorderIdTypeIntegerDescriptionRetrieve single order details.

Response properties

Response properties
PropertyordersTypeComplexDescriptionList of order records.
PropertyNested property, level 2. OrderTypeDescription
PropertyNested property, level 3. idTypeIntegerDescriptionInternal order identifier.
PropertyNested property, level 3. symbolTypeStringDescriptionSymbol that follows Questrade symbology (e.g., "TD.TO").
PropertyNested property, level 3. symbolIdTypeIntegerDescriptionInternal symbol identifier.
PropertyNested property, level 3. totalQuantityTypeIntegerDescriptionTotal quantity of the order.
PropertyNested property, level 3. openQuantityTypeIntegerDescriptionUnfilled portion of the order quantity.
PropertyNested property, level 3. filledQuantityTypeIntegerDescriptionFilled portion of the order quantity.
PropertyNested property, level 3. canceledQuantityTypeIntegerDescriptionUnfilled portion of the order quantity after cancellation.
PropertyNested property, level 3. sideTypeIntegerDescriptionClient view of the order side (e.g., "Buy-To-Open"). See Order Side section for all allowed values.
PropertyNested property, level 3. orderTypeTypeEnumerationDescriptionOrder price type (e.g., "Market"). See Order Type section for all allowed values.
PropertyNested property, level 3. limitPriceTypeIntegerDescriptionLimit price.
PropertyNested property, level 3. stopPriceTypeDoubleDescriptionStop price.
PropertyNested property, level 3. isAllOrNoneTypeBooleanDescriptionSpecifies all-or-none special instruction.
PropertyNested property, level 3. isAnonymousTypeBooleanDescriptionSpecifies Anonymous special instruction.
PropertyNested property, level 3. icebergQuantityTypeIntegerDescriptionSpecifies Iceberg special instruction.
PropertyNested property, level 3. minQuantityTypeIntegerDescriptionSpecifies Minimum special instruction.
PropertyNested property, level 3. avgExecPriceTypeDoubleDescriptionAverage price of all executions received for this order.
PropertyNested property, level 3. lastExecPriceTypeDoubleDescriptionPrice of the last execution received for the order in question.
PropertyNested property, level 3. sourceTypeEnumerationDescription
PropertyNested property, level 3. timeInForceTypeEnumerationDescriptionSee Order Time In Force section for all allowed values.
PropertyNested property, level 3. gtdDateTypeDateTimeDescriptionGood-Till-Date marker and date parameter
PropertyNested property, level 3. stateTypeEnumerationDescriptionSee Order State section for all allowed values.
PropertyNested property, level 3. clientReasonStrTypeStringDescriptionHuman readable order rejection reason message.
PropertyNested property, level 3. chainIdTypeIntegerDescriptionInternal identifier of a chain to which the order belongs.
PropertyNested property, level 3. creationTimeTypeDateTimeDescriptionOrder creation time.
PropertyNested property, level 3. updateTimeTypeDateTimeDescriptionTime of the last update.
PropertyNested property, level 3. notesTypeStringDescriptionNotes that may have been manually added by Questrade staff.
PropertyNested property, level 3. primaryRouteTypeEnumerationDescription
PropertyNested property, level 3. secondaryRouteTypeEnumerationDescription
PropertyNested property, level 3. orderRouteTypeEnumerationDescriptionOrder route name.
PropertyNested property, level 3. venueHoldingOrderTypeEnumerationDescriptionVenue where non-marketable portion of the order was booked.
PropertyNested property, level 3. commissionChargedTypeDoubleDescriptionTotal commission amount charged for this order.
PropertyNested property, level 3. exchangeOrderIdTypeStringDescriptionIdentifier assigned to this order by exchange where it was routed.
PropertyNested property, level 3. isSignificantShareholderTypeBooleanDescriptionWhether user that placed the order is a significant shareholder.
PropertyNested property, level 3. isInsiderTypeBooleanDescriptionWhether user that placed the order is an insider.
PropertyNested property, level 3. isLimitOffsetInDollarTypeBooleanDescriptionWhether limit offset is specified in dollars (vs. percent).
PropertyNested property, level 3. userIdTypeIntegerDescriptionInternal identifier of user that placed the order.
PropertyNested property, level 3. placementCommissionTypeDoubleDescriptionCommission for placing the order via the Trade Desk over the phone.
PropertyNested property, level 3. legsTypeComplexDescriptionList of OrderLeg elements.
PropertyNested property, level 3. OrderLegTypeComplexDescription
PropertyNested property, level 3. strategyTypeTypeEnumerationDescriptionMulti-leg strategy to which the order belongs.
PropertyNested property, level 3. triggerStopPriceTypeDoubleDescriptionStop price at which order was triggered.
PropertyNested property, level 3. orderGroupIdTypeIntegerDescriptionInternal identifier of the order group.
PropertyNested property, level 3. orderClassTypeEnumerationDescriptionBracket Order class. Primary, Profit or Loss.

Sample request

HTTP
GET https://api01.iq.questrade.com/v1/accounts/26598145/orders

Sample request

HTTP
GET https://api01.iq.questrade.com/v1/accounts/26598145/orders?ids=173577870,...

Sample JSON response

JSON
{
	"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

Report an issue

Have questions about Questrade's API? Tell us how we can help, send us an email.

Request a feature

We want your ideas on how we can improve our API. If you have a suggestion for a minor tweak, a major overhaul, or something brand new, please share it with us.

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.

See All