private/replace
Changed onAtomically cancels a resting order (identified by order_id_to_cancel or nonce_to_cancel) and submits a replacement order in a single request. The payload is a full new-order specification plus the cancel target and an optional expected_filled_amount guard. Requires a signed order payload and Orderbook trade scope; returns both the cancelled and the newly created order.
Request
- Base URLhttps://api.derive.xyz/v3
- AuthAPI key in header X-DeriveWallet and API key in header X-DeriveTimestamp and API key in header X-DeriveSignature
Request body
private/replace parameters: a private/order payload plus the cancel-target fields (order_id_to_cancel, nonce_to_cancel, expected_filled_amount).
Order amount in units of the base, as a decimal string (e.g. "1.5") or a JSON number.
Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted
Optional builder fee for the whole order, in USDC, as a decimal string or JSON number. Each fill pays its pro-rata share. Defaults to zero.
Limit price in quote currency, as a decimal string (e.g. "3100.5") or a JSON number.
Max fee per unit of volume in quote currency, as a decimal string or a JSON number.
Tags the order for market maker protection. Only tagged orders are cancelled by cancel on disconnect.
Optional UUID v4 string
Trigger price as a decimal string or JSON number; omit for non-trigger orders.
Response
Success
Changes
- info
added the required property
trades/items/block_trade_idto the response with the status
- info
- info
the endpoint scheme security
DeriveWallet AND DeriveTimestamp AND DeriveSignaturewas added to the API - info
added the media type
application/jsonfor the response with the status
- info