Skip to main content
PUT
Replace Order

Overview

Atomically cancel an existing open order and submit a new one in its place. The matching engine performs both steps in one operation, so you never end up holding both. Useful for amending limit orders as the market moves. The replacement is a new order, not a mutation — the response returns a fresh order ID. Track that ID for follow-up cancels and webhook events. Requires Trade scope. Only orders that are still resting (status open or partially_filled) can be replaced — terminal orders return 404.

Authentication

string
required
Your API key with Trade scope

Path Parameters

string
required
Order ID (UUID) to replace

Request Body

string
required
Order side for the new order.Allowed values: buy, sell
string
required
Order type for the new order.Allowed values: limit, market
string
required
Quantity for the new order.Example: 120.00
string
Limit price (required when type is limit).Example: 1550.00
string
Optional client idempotency key for the replacement order. For a limit order, use the same value that you sent when you requested the quote.Example: replace-20260903-001
string
Maximum cumulative taker fee that you authorize for a replacement limit order, in the quote asset. Send the estimated_fee value from the reviewed limit-order quote without changing it. Omission authorizes 0.00. Market orders ignore this field.Example: 37.20

Request Example

For a replacement limit order, request a new quote with client_order_id. Send the same client_order_id and the quote’s estimated_fee as max_taker_fee in the replacement request. The server charges only the realized fee. It rejects the replacement with TAKER_FEE_CAP_EXCEEDED if the realized taker fee would exceed the cap.

Response

Same shape as Get Order. The returned id is the new order — track it for follow-up cancels and webhook events.

Error Responses