Skip to main content
The modify action updates a resting (OPEN status) order without requiring you to cancel and replace it. You can change the price, total size, time-in-force (Gtc or Alo only), and client order ID. Direction (b), contract (a), and reduceOnly (r) cannot be changed — cancel the order and place a new one if you need to alter those fields.

Endpoint

Priority Rules

How you locate and modify the order determines whether it retains its queue position:
  • Same price, reduce size only — the modification is applied in-place. The order keeps its existing FIFO queue priority.
  • Change price, increase size, or change TIF/cloid — the order is removed from its current position and re-queued at the back of the new price level. It loses its original queue priority.
If the new price would immediately cross the book and match against a resting opposite-side order, the modification request is rejected. Cancel the order and place a new one to execute at a marketable price.

Request Body

Use oid to identify the order by the exchange-assigned ID returned in resting.oid.

Action Fields

string
required
Fixed value: "modify".
int32
required
asset — The integer contract ID of the order to modify.
int64
orderId — Exchange-assigned order ID from resting.oid. Takes priority over cloid when both are provided. At least one of oid or cloid must be present.
string
clientOrderId (locate) — Client order ID used to find the order when oid is not provided. Must match the c field set at placement.
string
price — New limit price as a decimal string. Omit to keep the existing price unchanged.
string
size — New total target size as a decimal string. This is the total quantity including any already-filled amount, not just the remaining leaves size. Omit to keep the existing size unchanged.
string
timeInForce — New time-in-force for the order. Only "Gtc" (good-til-cancel) or "Alo" (add-liquidity-only / post-only) are accepted. Omit to keep the existing TIF unchanged.
string
clientOrderId (update) — New client order ID to assign to the order after modification. Omit to keep the existing client order ID unchanged.
You must provide at least one of oid or cloid to identify the order. All other fields (p, s, tif, c) are optional — include only the fields you want to change.

Responses

The order was modified. The response reflects the new state of the order.

Response Fields

int64
The unchanged exchange-assigned order ID of the modified order.
number
The new limit price after the modification is applied.
number
The new total size of the order (including already-filled quantity).
number
The remaining unfilled quantity still resting in the book after the modification.
number
The updated client order ID. Reflects the new value if c was provided, or the previous value if it was not.
int
Absent or 0 indicates success. Any non-zero value indicates a rejection; read errorMessage for details. On rejection, all numeric fields are 0.
string
Human-readable rejection reason. Only present when errorCode is non-zero.

Known Errors