---
title: "Place Orders"
method: POST
path: "/iserver/account/{accountId}/orders"
tags: ["Order"]
---

# Place Orders

`POST /iserver/account/{accountId}/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](https://www.tradersinsight.news/category/ibkr-quant-news/programming_languages/rest-development/).
  * 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.

## Path parameters

- `accountId` string, required

## Request body

- object
  - `orders` OrderRequest[] — Notes for bracket orders: 1. Children orders will not have its own "cOID", so please donot pass "cOID" parameter in child order.Instead, they will have a "parentId" which must be equal to "cOID" of parent. 2. When you cancel a parent order, it will cancel all bracket orders, when you cancel one child order, it will also cancel its sibling order.
    - `acctId` string — acctId is optional. It should be one of the accounts returned by /iserver/accounts. If not passed, the first one in the list is selected.
    - `conid` integer — conid is the identifier of the security you want to trade, you can find the conid with /iserver/secdef/search.
    - `conidex` string — Conid and Exchange - Can be used instead of conid when specifying the contract identifier of a security.
    - `secType` string — The contract-identifier (conid) and security type (type) specified as a concatenated value, conid:type
    - `cOID` string — Customer Order ID. An arbitrary string that can be used to identify the order, e.g "my-fb-order". The value must be unique for a 24h span. Please do not set this value for child orders when placing a bracket order.
    - `parentId` string — Only specify for child orders when placing bracket orders. The parentId for the child order(s) must be equal to the cOId (customer order id) of the parent.
    - `orderType` string — The order-type determines what type of order you want to send. * LMT - A limit order is an order to buy or sell at the specified price or better. * MKT - A market order is an order to buy or sell at the markets current NBBO. * STP - A stop order becomes a market order once the specified stop price is attained or penetrated. * STOP_LIMIT - A stop limit order becomes a limit order once the specified stop price is attained or penetrated. * MIDPRICE - A MidPrice order attempts to fill at the current midpoint of the NBBO or better. * TRAIL - A sell trailing stop order sets the stop price at a fixed amount below the market price with an attached "trailing" amount. See more details here: https://ndcdyn.interactivebrokers.com/en/index.php?f=605 * TRAILLMT - A trailing stop limit order is designed to allow an investor to specify a limit on the maximum possible loss, without setting a limit on the maximum possible gain. See more details here: https://ndcdyn.interactivebrokers.com/en/index.php?f=606
    - `listingExchange` string — listingExchange is optional. By default we use "SMART" routing. Possible values are available via the endpoint: /iserver/contract/{conid}/info, see **valid_exchange** e.g: SMART,AMEX,NYSE,CBOE,ISE,CHX,ARCA,ISLAND,DRCTEDGE,BEX,BATS,EDGEA,CSFBALGO,JE FFALGO,BYX,IEX,FOXRIVER,TPLUS1,NYSENAT,PSX
    - `isSingleGroup` boolean — set to true if you want to place a single group orders(OCA)
    - `outsideRTH` boolean — set to true if the order can be executed outside regular trading hours.
    - `price` number — optional if order is LMT, or STOP_LIMIT, this is the limit price. For STP|TRAIL this is the stop price. For MIDPRICE this is the option price cap.
    - `auxPrice` unknown
    - `side` string — SELL or BUY
    - `ticker` string — This is the underlying symbol for the contract.
    - `tif` string — The Time-In-Force determines how long the order remains active on the market. * GTC - use Good-Till-Cancel for orders to remain active until it executes or cancelled. * OPG - use Open-Price-Guarantee for Limit-On-Open (LOO) or Market-On-Open (MOO) orders. * DAY - if not executed a Day order will automatically cancel at the end of the markets regular trading hours. * IOC - any portion of an Immediate-or-Cancel order that is not filled as soon as it becomes available in the market is cancelled.
    - `trailingAmt` number — optional if order is TRAIL, or TRAILLMT. When trailingType is amt, this is the trailing amount, when trailingType is %, it means percentage. You must specify both trailingType and trailingAmt for TRAIL and TRAILLMT order
    - `trailingType` string — This is the trailing type for trailing amount. We only support two types here: amt or %. You must specify both trailingType and trailingAmt for TRAIL and TRAILLMT order
    - `referrer` string — Custom order reference
    - `quantity` number — Usually integer, for some special cases such as fractional orders can specify as a float, e.g. quantity = 0.001. In some special cases quantity is not specified, such as when using 'cashQty' or 'fxQty'.
    - `cashQty` number — Cash Quantity - used to specify the monetary value of an order instead of the number of shares. When using 'cashQty' don't specify 'quantity' Orders that express size using a monetary value, e.g. cash quantity can result in fractional shares and are provided on a non-guaranteed basis. The system simulates the order by canceling it once the specified amount is spent (for buy orders) or collected (for sell orders). In addition to the monetary value, the order uses a maximum size that is calculated using the Cash Quantity Estimated Factor, which can be modified in Order Presets.
    - `fxQty` number — double number, this is the cash quantity field which can only be used for Currency Conversion Orders. When using 'fxQty' don't specify 'quantity'.
    - `useAdaptive` boolean — If true, the system will use the Price Management Algo to submit the order. https://www.interactivebrokers.com/en/index.php?f=43423
    - `isCcyConv` boolean — set to true if the order is a FX conversion order
    - `allocationMethod` string — Set the allocation method when placing an order using an FA account for a group Possible allocation methods are "NetLiquidity", "AvailableEquity", "EqualQuantity" and "PctChange".
    - `strategy` string — Specify which IB Algo algorithm to use for this order.
    - `strategyParameters` object — The IB Algo parameters for the specified algorithm.

## Response `200`

returns an array

- object[]
  - `id` string
  - `message` string[] — Please note here, if the message is a question, you have to reply to question in order to submit the order successfully. See more in the "/iserver/reply/{replyid}" endpoint.

---

[API](https://skmtc.dev/interactivebrokers/apis/client-portal-web-api.md) · [All operations](https://skmtc.dev/interactivebrokers/apis/client-portal-web-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/interactivebrokers/client-portal-web-api/revisions/32edbfe496d1/schema)
