New Customer Offer: Pay 0% interest for up to six months on $5K USD when you join Questrade with code 0MARGIN. Open a new margin account.

Documentation

The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.

POST accounts/:id/orders

Allows to (re)place an order against a certain account.

Request parameters

ParameteridTypeStringDescriptionAccount number against which order is being submitted. Can occur in the 'Location' header only.
ParameterorderIdTypeIntegerDescriptionOptional – order id of the order to be replaced.
ParametersymbolIdTypeIntegerDescriptionInternal symbol identifier.
ParameterquantityTypeIntegerDescriptionOrder quantity.
ParametericebergQuantityTypeIntegerDescriptionIceberg instruction quantity.
ParameterlimitPriceTypeDoubleDescriptionLimit price.
ParameterstopPriceTypeDoubleDescriptionStop price.
ParameterisAllOrNoneTypeBooleanDescriptionIdentifies whether the all-or-none instruction is enabled.
ParameterisAnonymousTypeBooleanDescriptionIdentifies whether the anonymous instruction is enabled.
ParameterorderTypeTypeEnumerationDescriptionOrder type (e.g., "Market"). See Order Type section for all allowed values.
ParameteractionTypeEnumerationDescriptionOrder side (e.g., "Buy"). See Order Action section for all allowed values.
ParameterprimaryRouteTypeEnumerationDescriptionPrimary order route (e.g., "AUTO").
ParametersecondaryRouteTypeEnumerationDescriptionSecondary order route (e.g., "NYSE").

Response properties

PropertyorderIdTypeIntegerDescriptionInternal order identifier.
PropertyordersTypeComplexDescriptionList of order objects.
PropertyNested property, level 2. OrderTypeComplexDescription

Sample request

HTTP
POST https://api01.iq.questrade.com/v1/accounts/26598145/orders 
{ 
	"accountNumber" :  XXXXXXXX ,
	"symbolId":   8049,
	"quantity": 10,
	"icebergQuantity": 1,
	"limitPrice": 537,
	"isAllOrNone":  true,
	"isAnonymous": false,
	"orderType": "Limit",
	"timeInForce": "GoodTillCanceled",
	"action": "Buy",
	"primaryRoute":"AUTO",
	"secondaryRoute": "AUTO"
}

Sample JSON response

JSON
{
	"orderId": 177106005 ,
	"orders": [
		{
			"id": 177106005 ,
			"symbol": "AAPL",
			"symbolId": 8049,
			"totalQuantity":  10,
			"openQuantity":   10,
			"filledQuantity": 0,
			"canceledQuantity": 0,
			"side": "Buy",
			"orderType":  "Limit",
			"limitPrice":  537,
			"stopPrice":  null,
			"isAllOrNone":  true,
			"isAnonymous":  false,
			"icebergQty":  1,
			"minQuantity":  null,
			"avgExecPrice":  null,
			"lastExecPrice":  null,
			"source":  "TradingAPI",
			"timeInForce":  "GoodTillCanceled",
			"gtdDate":  null,
			"state":  "Pending",
			"clientReasonStr":  "",
			"chainId":  177106005,
			"creationTime":  "2014-10-24T17:48:20.546000-04:00",
			"updateTime": "2014-10-24T17:48:20.876000-04:00",
			"notes":  "",
			"primaryRoute":  "LAMP",
			"secondaryRoute":  "AUTO",
			"orderRoute":  "LAMP",
			"venueHoldingOrder":  "",
			"comissionCharged":  0,
			"exchangeOrderId":  "",
			"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