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.

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, present when the order closed with part of it unfilled.

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

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

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