Young man smiling

Documentation

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

POST accounts/:id/orders/bracket[/impact]

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

NameTypeDescription
id
String
Account number against which order is being submitted.

Can occur in the ‘Location’ header only.
symbolId
Integer
Internal symbol identifier.
primaryRoute
Enumeration
Primary order route (e.g., "AUTO").
secondaryRoute
Enumeration
Secondary order route (e.g., "NYSE").
components
Complex
List of bracket order components

Data for each component of a bracket order.

NameTypeDescription
orderId
Integer
Order ID of active order, or 0 for new order
quantity
Double
Order quantity
action
Enumeration
Order (e.g., "Buy "), required only on initial insertion

See Order Action section for all allowed values.
limitPrice
Double
Limit price
stopPrice
Double
Stop price
orderType
Enumeration
Order type (e.g., "Market ").

See Order Type section for all allowed values.
timeInForce
Enumeration
Order duration (e.g., "DAY ").

See Order Duration section for all allowed values.
orderClass
Enumeration
For 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

Report an issue

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

Get Started

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.

Get Started
See All