Skip to main content
POST
/
v1
/
orders
/
replace
curl --request POST \
  --url https://api.aries.com/v1/orders/replace \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "origClOrdId": "ORDER-123456",
  "tradingAccountId": "TEST-ACCOUNT-001",
  "symbol": "AAPL",
  "side": "BUY",
  "type": "LIMIT",
  "qty": "20",
  "price": "150.00",
  "timeInForce": "DAY"
}
'
{
  "success": true,
  "clOrdId": "ORDER-20260115-003",
  "origClOrdId": "ORDER-20260115-001",
  "status": "REPLACED",
  "qty": "200",
  "price": "175.50",
  "text": "Replace accepted",
  "transactTime": "2026-01-15T14:31:00Z"
}

Authorizations

Authorization
string
header
required

OAuth2 Bearer token: obtain an access token from the token endpoint and send it in the Authorization header.

Body

application/json

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.

origClOrdId
string
required

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.

Required string length: 1 - 100
Example:

"ORDER-123456"

tradingAccountId
string
required

Trading account identifier that owns the order being replaced. It must match the account on the original order.

Required string length: 1 - 50
Example:

"TEST-ACCOUNT-001"

symbol
string
required

Symbol on the original order. Use the exact symbol from the order record.

Required string length: 1 - 21
Example:

"AAPL"

clientId
string

Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately.

Maximum string length: 50
side
enum<string>

Which 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.
Available options:
BUY,
SELL,
SELL_SHORT,
BUY_TO_COVER
Example:

"BUY"

type
enum<string>

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 limit price or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the price field.
  • STOP — Sits inactive until the market hits stopPrice, then converts to a market order. Common for stop-loss exits. Requires the stopPrice field.
  • STOP_LIMIT — Sits inactive until the market hits stopPrice, then converts to a limit order at price. More control than STOP, but the limit may not fill. Requires both stopPrice and price.
Available options:
MARKET,
LIMIT,
STOP,
STOP_LIMIT
Example:

"LIMIT"

qty
string

Replacement order quantity as a decimal string. Send it when changing order size.

Example:

"20"

price
string

Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price.

Example:

"148.50"

stopPrice
string

Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger.

Example:

"145.00"

timeInForce
enum<string>

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.
Available options:
DAY,
GTC,
IOC,
FOK,
EXTENDED_HOURS,
AT_THE_OPENING,
AT_THE_CLOSE
Example:

"DAY"

currency
string

Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency.

Required string length: 3
Example:

"USD"

legs
object[]

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.

Maximum array length: 4

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.

success
boolean

Whether Aries or the broker accepted the replace request for processing.

Example:

true

clOrdId
string

New client order ID assigned to the replacement order. Store this for future status, replace, or cancel operations.

Example:

"ORDER-123457"

origClOrdId
string

Client order ID of the order that was replaced. Use it to connect the replacement back to the original order.

Example:

"ORDER-123456"

status
enum<string>

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 to REPLACED once confirmed.
  • REPLACED — the modification took effect. From now on, refer to the order by the new clOrdId.
  • 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.

Available options:
NEW,
PARTIALLY_FILLED,
FILLED,
DONE_FOR_DAY,
CANCELED,
REPLACED,
PENDING_CANCEL,
STOPPED,
REJECTED,
SUSPENDED,
PENDING_NEW,
CALCULATED,
EXPIRED,
ACCEPTED_FOR_BID,
PENDING_REPLACE,
SUPERSEDED
Example:

"REPLACED"

qty
string

Replacement order quantity as a decimal string. Display this as the current order size after a successful replace.

Example:

"20"

price
string

Replacement order price as a decimal string. Display this as the current limit or reference price after a successful replace.

Example:

"150.00"

text
string

Broker or platform message about the replace result. Show it when replacement is rejected or pending.

transactTime
string<date-time>

Time the replace action was processed. Use it for order timelines and audit logs.