---
title: "Modify Open Order"
method: POST
path: "/iserver/account/{accountId}/order/{orderId}"
tags: ["tradingOrders"]
---

# Modify Open Order

`POST /iserver/account/{accountId}/order/{orderId}`

Modify an existing, unfilled order.

## Path parameters

- `accountId` string, required
- `orderId` string, required

## Request body

- SingleOrderSubmissionRequest — A single order ticket.
  - `acctId` string — Receiving account of the order ticket.
  - `conid` integer, required — IB contract ID of the instrument.
  - `conidex` string — Contract ID and routing destination together in format 123456@EXCHANGE.
  - `secType` string — IB asset class identifier.
  - `cOID` string — Client-configurable order identifier. The value must be unique for a 24 hour span. The value can be no longer than 64 characters. Should not be set for the child of a bracket order.
  - `parentId` string — If the order ticket is a child order in a bracket, the parentId field must be set equal to the cOID provided for the parent order.
  - `listingExchange` string — The listing exchange of the instrument.
  - `isSingleGroup` boolean — Indicates that all orders in the containing array are to be treated as an OCA group.
  - `outsideRTH` boolean — Instructs IB to permit the order to execute outside of regular trading hours.
  - `allOrNone` boolean — Instructs IB to execute the order entirely or not execute at all.
  - `auxPrice` number, double — Additional price value used in certain order types, such as stop orders.
  - `ticker` string — Ticker symbol of the instrument.
  - `trailingAmt` number, double — Offset used with Trailing orders.
  - `trailingType` 'amt' | '%' — Specifies the type of trailing used with a Trailing order.
  - `referrer` string — IB internal identifier for order entry UI element.
  - `cashQty` number, double — Quantity of currency used with cash quantity orders.
  - `useAdaptive` boolean — Instructs IB to apply the Price Management Algo.
  - `isCcyConv` boolean — Indicates that a forex order is for currency conversion and should not entail a virtual forex position in the account, where applicable.
  - `orderType` string, required — IB order type identifier.
  - `price` number, double — Price of the order ticket, where applicable.
  - `side` 'BUY' | 'SELL', required — Side of the order ticket.
  - `tif` 'DAY' | 'IOC' | 'GTC' | 'OPG' | 'PAX', required — Time in force of the order ticket.
  - `quantity` number, double, required — Quantity of the order ticket in units of the instrument.
  - `strategy` string — The name of an execution algorithm.
  - `strategyParameters` SingleOrderSubmissionRequestStrategyParameters — Parameters governing the selected algorithm, if applicable.
    - `PLACEHOLDER` string — Placeholder -- these vary by algo (and not always type string, sometimes bool)
  - `extOperator` string — ExtOperator is used to identify external operator
  - `manualIndicator` boolean — For all orders for US Futures products, clients must submit this flag to indicate whether the order was originated manually (by a natural person) or automatically (by an automated trading system transmitting orders without human intervention). Submit a True value to indicate a manually originated order, and submit a False value to indicate an automated order. Orders for USFUT products that do not include this field will be rejected.
  - `taxOptimizerId` string — Identifies set of tax lots selected, for gains and losses management.
  - `jsonPayload` SingleOrderSubmissionRequestJsonPayload
    - `allocation_profile` SingleOrderSubmissionRequestJsonPayloadAllocationProfile — The assigned contents for how the order should be allocated amongst subaccount(s).
      - `alloc_type` 'SHARE' | 'CASH' — The allocation type to define how shares should be distributed. A warning message to be pre-approved. * `SHARE` - Designate the allocation amounts as a quantity of shares. * `CASH` - Designate the allocation amounts as a quantity of a cash quantity to allocate.
      - `allocations` SingleOrderSubmissionRequestJsonPayloadAllocationProfileAllocationsItems[] — List of accounts to allocate a trade and the affiliated quantity.
        - `account` string — Account to allocate trades to.
        - `amount` number, double — Allocation to the given account based on the alloc_type.

## Response `200`

Status of submission

- union
  - OrderSubmitSuccessItems[] — A successful submission of one or more order tickets.
    - `order_id` string — The order ID assigned to your order ticket by IB. Contains only numerals.
    - `order_status` string — Status describing where the order stands in its lifecycle.
    - `encrypt_message` string — Internal use only.
  - OrderSubmitError — Indicates that the order reply message or submission was not accepted.
    - `error` string — Message indicating that order submission was not successful.
  - OrderReplyMessageItems[] — An array containing objects that each deliver the order reply messages emitted against one order ticket in the submission request's array. Indicies of the order reply message objects in this array correspond to the indicies of the order tickets in the submission request's array.
    - `id` string — The replyId UUID of the order ticket's emitted order reply messages, used to confirm them and proceed. Use the POST /iserver/reply/{replyId} endpoint to confirm an order reply message.
    - `isSuppressed` boolean — Internal use. Always delivers value 'false'.
    - `message` string[] — An array containing the human-readable text of all order reply messages emitted for the order ticket.
    - `messageIds` string[] — An array containing identifiers that categorize the types of order reply messages that have been emitted. Elements of this array are ordered so that indicies match the corresponding human-readable text strings in the 'message' array. A messageId can typically be passed in the POST /iserver/questions/suppress endpoint to auto-accept a given warning message.
  - AdvancedOrderReject — Relates a message generated in response to the rejection of the submitted order ticket. In some cases, it may also present a mechanism to resubmit the same order following a prompted decision.
    - `orderId` integer — The order ID assigned by IB to the rejected order ticket.
    - `reqId` string — IB's internal identifier assigned to the returned message.
    - `dismissable` unknown[] — Indicates whether this prompt is dismissable.
      - unknown
    - `text` string — Human-readable text of the messages emitted by IB in response to order submission.
    - `options` string[] — Choices available to the client in response to the rejection message.
    - `type` string — The specific type of message returned.
    - `messageId` string — IB internal identifier for the nature or category of the returned message.
    - `prompt` boolean — Indicates that the message is a prompt offering a set of decisions, one or more of which may permit the rejected order to be resubmitted.

## Other responses

- `400` — Missing, empty, non-numeric, or out-of-range parameter. The `error` field is always prefixed with `Bad Request:`.
- `401` — Missing, invalid, or unparseable Authorization token.
- `500` — internal server error, returned when incoming request cannot be processed. It can sometimes include subset of bad requests. For example, wrong accountId passed and it can only be detected later in handling request. Error contains reason of the problem.
- `503` — service is unavailable. For example if request takes more than 10s due to some internal service unavailability, request aborted and this status returned

---

[API](https://skmtc.net/interactivebrokers/apis/api-reference.md) · [All operations](https://skmtc.net/interactivebrokers/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/interactivebrokers/api-reference/revisions/67f9f562c2c6/schema)
