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 Name | Type | Description |
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
Name | Type | Description |
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"
}
]
}