Modify Order
PUT/api/v1/crypto/accounts/{acc_id}/orders/{orderId}Modify the price or quantity of an outstanding (unfilled) order.
Restrictions
- Only untriggered (
ord_status = PENDING_TRIGGER) conditional orders can be modified; modification is not allowed after triggering. - Both
qtyandpriceare required. If you only need to change one field, pass the current value for the other.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
acc_id | uint64 | Yes | Account ID |
orderId | string | Yes | ID of the order to modify |
Request Parameters
| Parameter | Type | Location | Required | Description |
|---|---|---|---|---|
req_id | string | Body | Yes | Idempotency ID, 16–64 characters. The gateway prepends gw_ and forwards it downstream for deduplication. |
qty | string | Body | Yes | New order quantity |
price | string | Body | Yes | New order price |
order_version | uint32 | Body | Yes | Order version number for optimistic locking. Obtained from the version field in the order details. |
conditional_info | object | Body | No | Conditional order details. Only required when modifying a conditional order. |
conditional_info Fields
| Parameter | Type | Required | Description |
|---|---|---|---|
trigger_price | string | Yes | New trigger price for the conditional order |
Request Example
bash
curl -X PUT "https://webapi.futunn.com/api/v1/crypto/accounts/123456/orders/FTHC2989880641155745280T" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <AppKey>" \
-H "X-Timestamp: <timestamp_ms>" \
-H "X-Nonce: <nonce>" \
-H "Authorization: <signature_base64>" \
-d '{
"req_id": "1750000000001_a1b2c3d4e5f6g7h8",
"qty": "0.02",
"price": "29500",
"order_version": 1
}'Response Example
json
{
"code": 0,
"msg": "success",
"data": {
"order_id": "FTHC2989880641155745280T"
}
}Error Response:
json
{
"code": 1,
"msg": "Error message."
}