Order
Place Orders
When connected to an IServer Brokerage Session, this endpoint will allow you to submit orders. CP WEB API supports various advanced orderTypes, for additional details and examples refer to IBKR Quant Blog.
- Bracket - Attach additional opposite-side order(s) by using a single cOID sent with the parent and set the same value for parentId in each child order(s).
- Cash Quantity - Send orders using monetary value by specifying cashQty instead of quantity, e.g. cashQty: 200. The endpoint /iserver/contract/rules returns list of valid orderTypes in cqtTypes.
- Currency Conversion - Convert cash from one currency to another by including isCcyConv = true. To specify the cash quantity use fxQTY instead of quantity, e.g. fxQTY: 100.
- Fractional - Contracts that support fractional shares can be traded by specifying quantity as a float, e.g. quantity: 0.001. The endpoint /iserver/contract/rules returns a list of valid orderTypes in fraqTypes.
- IB Algos - Attached user-defined settings to your trades by using any of IBKR's Algo Orders. Use the endpoint /iserver/contract/{conid}/algos to identify the available strategies for a contract.
- One-Cancels-All (OCA) - Group multiple unrelated orders by passing order request info in an array and including isSingleGroup = true for each order. All orders will be assigned the same oca_group_id.
post/iserver/account/{accountId}/orders
Path parameters
accountIdstring required
account id
Request body
Example request
{
"orders": [
{
"conidex": "conidex = 265598",
"secType": "secType = 265598:STK",
"trailingType": "amt",
"referrer": "QuickTrade"
}
]
}Response
returns an array
Changes
No recorded changes to this endpoint across all 1 revision of this API.