Documentation
The Questrade API allows developers to create their own fully featured trading and analytical applications through their brokerage account.
REST operations
POST accounts/:id/orders/bracket
Allows to (re)place or estimate impact of a bracket order against a certain account. The responses are the same for all bracket order insert and replace calls as the responses for old order calls (including impact). OrderGroupID and orderClass will be filled out for bracket orders in response.
Request
| Name | Type | Description |
|---|---|---|
| Nameid | TypeString | DescriptionAccount number against which order is being submitted. Can occur in the 'Location' header only. |
| NamesymbolId | TypeInteger | DescriptionInternal symbol identifier. |
| NameprimaryRoute | TypeEnumeration | DescriptionPrimary order route (e.g., "AUTO"). |
| NamesecondaryRoute | TypeEnumeration | DescriptionSecondary order route (e.g., "NYSE"). |
| Namecomponents | TypeComplex | DescriptionList of bracket order components |
Data for each component of a bracket order.
| Name | Type | Description |
|---|---|---|
| NameorderId | TypeInteger | DescriptionOrder ID of active order, or 0 for new order |
| Namequantity | TypeDouble | DescriptionOrder quantity |
| Nameaction | TypeEnumeration | DescriptionOrder (e.g., "Buy "), required only on initial insertion See Order Action section for all allowed values. |
| NamelimitPrice | TypeDouble | DescriptionLimit price |
| NamestopPrice | TypeDouble | DescriptionStop price |
| NameorderType | TypeEnumeration | DescriptionOrder type (e.g., "Market "). See Order Type section for all allowed values. |
| NametimeInForce | TypeEnumeration | DescriptionOrder duration (e.g., "DAY "). See Order Duration section for all allowed values. |
| NameorderClass | TypeEnumeration | DescriptionFor bracket order describes the type of component See Order Class section for all allowed values |
New Bracket
Primary and only one of the exit orders are required.
Sample request
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket/impact
{
"symbolId": 27426,
"primaryRoute": "AUTO",
"secondaryRoute": "AUTO",
"components": [
{
"limitPrice": 2,
"stopPrice": 3,
"orderType": "StopLimit",
"timeInForce": "Day",
"orderClass": "Primary",
"quantity": 100,
"action": "Buy"
},
{
"limitPrice": 1000,
"orderType": "Limit",
"timeInForce": "Day",
"orderClass": "Limit",
"quantity": 100,
"action": "Sell"
},
{
"limitPrice": 0.9,
"stopPrice": 1,
"orderType": "StopLimit",
"timeInForce": "Day",
"orderClass": "StopLoss",
"quantity": 100,
"action": "Sell"
}
]
}New bracket on existing order
Primary orderId and one of the exit orders are required.
Sample request
{
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket/impact
{
"symbolId":27426 ,
"primaryRoute": "AUTO",
"secondaryRoute": "AUTO",
"components": [
{
"orderId": 123456789,
"orderClass": "Primary"
},
{
"limitPrice": 1000,
"orderType": "Limit",
"timeInForce": "Day",
"orderClass": "Limit",
"quantity": 100,
"action": "Sell"
},
{
"limitPrice": 0.9,
"stopPrice": 1,
"orderType": "StopLimit",
"timeInForce": "Day",
"orderClass":"StopLoss",
"quantity": 100,
"action": "Sell"
}
]
}New bracket on position
Both exit orders are required otherwise just place a single order.
Sample request
{
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket
POST https://api01.iq.questrade.com/v1/accounts/90000004/orders/bracket/impact
{
"symbolId": 27426,
"primaryRoute": "AUTO",
"secondaryRoute":"AUTO",
"components": [
{
"limitPrice": 1000,
"orderType": "Limit",
"timeInForce": "Day",
"orderClass": "Limit",
"quantity": 100,
"action": "Sell"
},
{
"limitPrice": 0.9,
"stopPrice": 1,
"orderType": "StopLimit",
"timeInForce": "Day",
"orderClass": "StopLoss",
"quantity": 100,
"action": "Sell"
}
]
}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.


