Cancel-Replace an existing order
Submits a request to replace an existing order asynchronously for the specified account. A replacement lets you modify an open order (for example, its quantity or price) without cancelling and resubmitting it manually. Note: Order replacement is asynchronous. This response confirms submission only. To verify the order status or execution details, use the GET /{orderId} endpoint after replacement. Supported for equity, option, and crypto quantity orders. Bracket orders: the opening (entry) order cannot be replaced. The closing legs (take-profit, stop-loss, and both legs of an OCO) can have their limitPrice and stopPrice replaced; quantity, orderType and expiration must be resubmitted unchanged.
You are using your live production account. These commands will execute real orders in your real account, proceed with caution.
| Name | Type | Required | Description |
|---|---|---|---|
| accountId | string | Yes | - |
This value identifies the order to be replaced; if reused on the same account, the operation is idempotent. If the order is re-submitted due to a read timeout, do not modify any properties. If the original request succeeded, altering fields will have no effect.
Id of the new order in UUID-format conforming to RFC 4122 (standard 8-4-4-4-12 format, e.g., 0d2abd8d-3625-4c83-a806-98abf35567cc). The new orderId must be globally unique over time.
The Type of order
MARKET,LIMIT,STOP,STOP_LIMITThe order quantity. Used when buying/selling whole shares and when selling fractional. Mutually exclusive with `amount`
The order amount. Used when replacing an order for a specific notional value. Mutually exclusive with `quantity`
The limit price. Used when orderType = LIMIT or orderType = STOP_LIMIT
The stop price. Used when orderType = STOP or orderType = STOP_LIMIT
Order validation failed.
No response body defined
{
"orderId": "c98f8791-3bf5-496a-a1f6-d3f7ce4fe08a"
}