This endpoint is designed to replace an existing limit order with a new one. Upon replacement, the order will be assigned a new order_id
while retaining the original customer_order_id
. The operation will fail if the limit order no longer exists in the order book (e.g., if it has been canceled, filled, or otherwise removed).
Required Request Headers:
X-Signature
: The required digital signature of the request.
Body Parameters:
id
: Numeric id or customer id of the order.customer_order_id
: New customer_order_id [optional]type
: Specifies the type of order, such as limit or market"limit_price
: The limit price for the order.quantity_steps
: The size of the order expressed in the smallest tradable increments, always an integer. Only one quantity parameter should be provided.quantity_contracts
: The size of the order in terms of contracts. Only one quantity parameter should be provided.quantity_assets
: The size of the order in units of the underlying asset. Only one quantity parameter should be provided.timestamp
: Time of request creation, required for all trading requests. In milliseconds.recv_window
: The number of milliseconds after timestamp the request is valid for.
Responses:
200 OK
: Successfully created order details including status, order ID, transaction hash, and associated events.404 Not Found
: An order with provided id not found.
When modifying quantity, providing a positive value (e.g., "0.5") has different effects depending on the order type. For LONG (BUY) orders, it increases the position size in the existing direction - for example, if the current position is BUY 1.0, setting size to "0.5" would result in BUY 1.5. However, for SHORT (SELL) orders, providing "0.5" decreases the sell quantity - if the current position is SELL 1.0, it would result in SELL 0.5.
Each request to this endpoint costs 1 API credits.