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",
  "accountId": "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"
}

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

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

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.

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.

Required string length: 1 - 100
Example:

"ORDER-123456"

accountId
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 - 20
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>

Direction 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.

Available options:
BUY,
SELL,
SELL_SHORT,
BUY_TO_COVER
Example:

"BUY"

type
enum<string>

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.

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 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.

Available options:
DAY,
GTC,
IOC,
FOK,
EXTENDED_HOURS,
AT_THE_OPENING,
AT_THE_CLOSE
Example:

"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.

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
string

Order status after the replacement request. REPLACED means the change took effect; pending or rejected statuses need follow-up.

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.