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.
Documentation Index
Fetch the complete documentation index at: https://finance.dev/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.
Body
Replace payload: origClOrdId, accountId, symbol, side, and updated fields (qty, price, timeInForce, etc.).
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.
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 - 20"AAPL"
Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately.
50Direction of the trade. Use BUY when purchasing shares or contracts, SELL when selling a position you own, SELL_SHORT when opening a short sale, and BUY_TO_COVER when closing a short position.
BUY, SELL, SELL_SHORT, BUY_TO_COVER "BUY"
How the order should execute. MARKET tries to fill immediately at the current market price. LIMIT fills only at your price or better. STOP activates when stopPrice is reached. STOP_LIMIT activates at stopPrice and then uses price as the limit.
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 remain active. DAY cancels at market close if unfilled. GTC stays active until filled or canceled. IOC fills what is available immediately and cancels the rest. FOK fills the entire quantity immediately or cancels the whole order. EXTENDED_HOURS allows eligible extended-hours trading. AT_THE_OPENING and AT_THE_CLOSE target the opening or closing auction.
DAY, GTC, IOC, FOK, EXTENDED_HOURS, AT_THE_OPENING, AT_THE_CLOSE "DAY"
Response
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 replacement request. REPLACED means the change took effect; pending or rejected statuses need follow-up.
"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.