POST
Replace an order

Authorizations

Authorization
string
header
required

The authorization field takes the session bearer returned by sign-in, or an API key where the route allows keys. Paste the token itself into the authorization field. When invitation-only access is enabled, private operations require the account's sign-in email to be invited. Sign-in can complete without an invitation, but private HTTP, MCP and FIX operations refuse with access_not_allowlisted (HTTP 403): "Private access is limited to invited accounts. Contact support to request access." Public market data remains available. Invitation changes apply to the next private operation, including existing FIX sessions. Do not retry until support confirms access.

Headers

Idempotency-Key
string
required
Minimum string length: 1

Path Parameters

orderId
string
required
Minimum string length: 1

Body

application/json
accountId
string
required
Minimum string length: 1
marketId
string
required
Minimum string length: 1
priceAtoms
string
required

The new limit price, in price atoms of the market.

Pattern: ^[1-9][0-9]*$
quantityAtoms
string
required

The new TOTAL order quantity, in quantity atoms: what has already filled plus what rests after the replace. It must be greater than the quantity already filled.

Pattern: ^[1-9][0-9]*$

Response

Accepted for processing

version
string
required
Allowed value: "external-order/v1"
orderId
string
required
Minimum string length: 1
accountId
string
required
Minimum string length: 1
marketId
string
required
Minimum string length: 1
status
enum<string>
required
Available options:
open,
partially_filled,
filled,
canceled,
replaced
lastSequence
integer
required
Required range: x >= 0
idempotencyKey
string
required
Minimum string length: 1
cancelReason
enum<string>

Why the order closed. price_protection: a market order that is not reduce-only trades only inside a band around the mark price (1% on most markets, 3% on thin ones); the part that found no liquidity inside the band was cancelled.

Available options:
margin_unbacked,
risk_evidence_incomplete,
market_session_closed,
reduce_only_position_unavailable,
price_protection
quantity
string

The order's base quantity when recorded, also returned when the order closed with part of it unfilled.

Pattern: ^[0-9]+(?:\.[0-9]+)?$
filledQuantity
string

The base quantity that filled when recorded, also returned when the order closed with part of it unfilled.

Pattern: ^[0-9]+(?:\.[0-9]+)?$
side
enum<string>

The accepted order side, when recorded.

Available options:
buy,
sell
orderType
enum<string>

The accepted order type, when recorded.

Available options:
limit,
market
price
string | null

The accepted limit price as a decimal string when recorded. Null for a recorded market order; absent when no order type or decimal limit price is available.

Pattern: ^[0-9]+(?:\.[0-9]+)?$
priceAtoms
string | null

The accepted limit price in price atoms when recorded. Null for a recorded market order; absent when the type or limit price is unavailable.

Pattern: ^[0-9]+$
quantityAtoms
string

The accepted original base quantity in quantity atoms, when recorded.

Pattern: ^[0-9]+$
filledQuantityAtoms
string

The filled base quantity in quantity atoms, when recorded. Absence does not mean zero; use account.fills keyed by orderId for execution updates.

Pattern: ^[0-9]+$
createdJournalSequence
integer

The journal sequence that created the order, when recorded. This is an ordinal, not a timestamp.

Required range: x >= 0
updatedJournalSequence
integer

The journal sequence of the latest lifecycle update, equal to lastSequence. This is an ordinal, not a timestamp.

Required range: x >= 0