Replace Order
Modifies an existing open order by replacing it with updated parameters such as price or quantity. This operation cancels the original order and submits a new one atomically, maintaining order continuity.
Use Case: Adjust limit prices or order quantities in response to market movements without losing queue position unnecessarily.
ID cycling: Each successful replace returns a new clOrdId in the response alongside the origClOrdId you sent. For any further replace of the same order, you must send this new clOrdId as origClOrdId — the previous ID is invalidated once the replace is accepted.
Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Body
Which order to modify and what to change. Required: origClOrdId, tradingAccountId, symbol. Then include only the fields you want to update — typically some combination of qty, price, stopPrice, type, and timeInForce.
Request body for replacing an open order through the core trading API. Use this when the user changes price, quantity, stop price, or time-in-force before the order fully fills.
Client order ID of the original open order you want to replace. Use the clOrdId returned by Place Order or List active orders. Important — ID cycling: each successful replace returns a new clOrdId in the response. For any subsequent replace of the same order, send this new clOrdId as origClOrdId — not the ID from the original placement. Reusing the old ID will be rejected.
1 - 100"ORDER-123456"
Trading account identifier that owns the order being replaced. It must match the account on the original order.
1 - 50"TEST-ACCOUNT-001"
Symbol on the original order. Use the exact symbol from the order record.
1 - 21"AAPL"
Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately.
50Which direction to trade in. Pick one:
BUY— buying shares or contracts (opens a long position or closes an existing short).SELL— selling shares or contracts you already hold (closes a long position).SELL_SHORT— selling shares you do not own (opens a short position). Subject to short-sale regulations.BUY_TO_COVER— buying shares to close an open short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
How the order is priced. Pick one:
MARKET— Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.LIMIT— Execute only at the limitpriceor better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires thepricefield.STOP— Sits inactive until the market hitsstopPrice, then converts to a market order. Common for stop-loss exits. Requires thestopPricefield.STOP_LIMIT— Sits inactive until the market hitsstopPrice, then converts to a limit order atprice. More control thanSTOP, but the limit may not fill. Requires bothstopPriceandprice.
MARKET, LIMIT, STOP, STOP_LIMIT "LIMIT"
Replacement order quantity as a decimal string. Send it when changing order size.
"20"
Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price.
"148.50"
Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger.
"145.00"
How long the order should stay alive before automatically cancelling. Pick one:
DAY— Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.GTC— Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).IOC— Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.FOK— Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.EXTENDED_HOURS— Active during pre-market and after-hours trading sessions in addition to regular hours.AT_THE_OPENING— Execute at the official market open price; if it can't fill at open, it's cancelled.AT_THE_CLOSE— Execute at the official market close price; if it can't fill at close, it's cancelled.
DAY, GTC, IOC, FOK, EXTENDED_HOURS, AT_THE_OPENING, AT_THE_CLOSE "DAY"
Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency.
3"USD"
Option legs to replace, for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread/multi-leg strategy. The instrument is identified from the legs (single leg) or auto-parsed from an OSI symbol when legs is omitted.
4Response
Replace request submitted successfully
Response returned after requesting an order replacement. Treat it as the replacement result and monitor the new client order ID going forward.
Whether Aries or the broker accepted the replace request for processing.
true
New client order ID assigned to the replacement order. Store this for future status, replace, or cancel operations.
"ORDER-123457"
Client order ID of the order that was replaced. Use it to connect the replacement back to the original order.
"ORDER-123456"
Order status after the replace request. Typical values after a successful replace:
PENDING_REPLACE— replace request accepted by the broker but not yet final. Keep monitoring; will move toREPLACEDonce confirmed.REPLACED— the modification took effect. From now on, refer to the order by the newclOrdId.REJECTED— the replace was refused (e.g. the order had already fully filled). The original order is unchanged.
The full FIX OrdStatus enum is supported — see the Place Order response for the complete list of possible values.
NEW, PARTIALLY_FILLED, FILLED, DONE_FOR_DAY, CANCELED, REPLACED, PENDING_CANCEL, STOPPED, REJECTED, SUSPENDED, PENDING_NEW, CALCULATED, EXPIRED, ACCEPTED_FOR_BID, PENDING_REPLACE, SUPERSEDED "REPLACED"
Replacement order quantity as a decimal string. Display this as the current order size after a successful replace.
"20"
Replacement order price as a decimal string. Display this as the current limit or reference price after a successful replace.
"150.00"
Broker or platform message about the replace result. Show it when replacement is rejected or pending.
Time the replace action was processed. Use it for order timelines and audit logs.