This endpoint requires signature authentication. See our comprehensive Authentication via Signatures guide for implementation details.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
Required parameters
-
action
(object, required) — The modify action object containing:type
(string) — Must be"modify"
oid
(number or string) — Order ID to modify, or cloid if using client order IDorder
(object) — New order parameters:a
(number) — Asset indexb
(boolean) — Is buy order (true for buy/long, false for sell/short)p
(string) — New limit prices
(string) — New size in units of the base assetr
(boolean) — Reduce only ordert
(object) — Order type specification:- For limit orders:
{"limit": {"tif": "Alo" | "Ioc" | "Gtc"}}
- For trigger orders:
{"trigger": {"isMarket": boolean, "triggerPx": string, "tpsl": "tp" | "sl"}}
- For limit orders:
c
(string, optional) — New client order ID (128-bit hex string)
-
nonce
(number, required) — Current timestamp in milliseconds (must be recent) -
signature
(object, required) — EIP-712 signature of the action
Optional parameters
vaultAddress
(string, optional) — Address when trading on behalf of a vault or subaccountexpiresAfter
(number, optional) — Timestamp in milliseconds after which the request is rejected
Returns
Returns an object with modification status:status
—"ok"
if request processedresponse
— Contains modification details:type
—"modify"
data
— Modification result information
Example request
Modification behavior
- Priority preservation — Modifying only the size preserves queue priority
- Price changes — Changing the price moves the order to the back of the queue
- Partial fills — Can modify partially filled orders (remaining size only)
- Order types — Can change between different order types
Use cases
- Price adjustment — Update limit price based on market movements
- Size scaling — Increase or decrease order size
- Strategy updates — Adjust orders without losing position in queue
- Risk management — Convert orders to reduce-only
Modifying an order is more efficient than cancel-and-replace, especially when only changing the size, as it can preserve your position in the order queue.
Some modifications may cause loss of queue priority. Price changes always move the order to the back of the queue at the new price level.
Body
application/json
Current timestamp in milliseconds
EIP-712 signature of the action with r, s, v components
Address when trading on behalf of a vault or subaccount (optional)
Timestamp in milliseconds after which the request is rejected (optional)