Modify Order
Modify Order
Description​
Support modifying orders using either the order ID (orderId) or a custom order ID (clientOid).
- Only orders that have not been fully filled can be modified. If an order has been completely filled, it cannot be modified through this interface.
- After submitting a modification request and before receiving the result, repeated modification requests cannot be submitted.
HTTP Request​
- POST /api/v3/trade/modify-order
- Rate limit: 10/sec/UID
- Permission: UTA trade
Request
curl -X POST "https://api.bitget.com/api/v3/trade/modify-order" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{ "orderId": "1","qty": "123", "price": "123", "autoCancel": "no" }'
Request Parameters​
| Parameters | Type | Required | Description |
|---|---|---|---|
| orderId | String | No | Order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
| clientOid | String | No | Client order ID Either orderId or clientOid must be provided If both orderId and clientOid are provided simultaneously, orderId takes higher priority |
| requestId | Number | No | Custom request ID to identify this modify order request Only supports numbers within 18 digits Returned when autoCancel=yes and the modify order request is rejected |
| qty | String | No | Order quantity Base coin Either qty or price must be provided |
| price | String | No | Order price Either qty or price must be provided |
| autoCancel | String | No | Will the original order be canceled if the order modification failsyes: Cancel no: Not cancel(default)When set to yes: if the matching engine fails to modify the order, the order is cancelled immediately; after cancellation, the counter will reject any further modification requests for that order (including in-flight and new requests). |
| symbol | String | Yes | Symbol name e.g., BTCUSDT Case-insensitive |
| category | String | Yes | Product type SPOT Spot trading MARGIN Margin trading USDT-FUTURES USDT futures COIN-FUTURES Coin-M futures USDC-FUTURES USDC futures |
| tpTriggerBy | String | No | Preset Take-Profit Trigger Typemarket Market pricemark Mark priceDefaults to market price if not specified Only valid for futures: USDT-FUTURES, COIN-FUTURES, USDC-FUTURES If not provided or empty, the existing value remains unchanged |
| slTriggerBy | String | No | Preset Stop-Loss Trigger Typemarket Market pricemark Mark priceDefaults to market price if not specified Only valid for futures: USDT-FUTURES, COIN-FUTURES, USDC-FUTURES If not provided or empty, the existing value remains unchanged |
| takeProfit | String | No | Preset Take-Profit Trigger Price If not provided or empty, the existing value remains unchanged Pass "0" to cancel take-profit |
| stopLoss | String | No | Preset Stop-Loss Trigger Price If not provided or empty, the existing value remains unchanged Pass "0" to cancel stop-loss |
| tpOrderType | String | No | Take-Profit Strategy Order Typelimit Limit ordermarket Market order |
| slOrderType | String | No | Stop-Loss Strategy Order Typelimit Limit ordermarket Market order |
| tpLimitPrice | String | No | Take-Profit Strategy Order Execution Price Only valid for limit orders ( tpOrderType=limit); ignored for market ordersIf not provided or empty, the existing value remains unchanged |
| slLimitPrice | String | No | Stop-Loss Strategy Order Execution Price Only valid for limit orders ( slOrderType=limit); ignored for market ordersIf not provided or empty, the existing value remains unchanged |
| pxAmendType | String | No | Order price amendment typeno When the order price exceeds the price limit range, the system is not allowed to adjust the order price; the order will be rejected (default)yes When the order price exceeds the price limit range, the system is allowed to adjust the price to the best value within the limit range and place the orderOnly applicable to limit orders ( orderType=limit) |
Response
{
"code": "00000",
"data": {
"orderId": "121212121212",
"clientOid": "BITGET#1627293504612"
},
"msg": "success",
"requestTime": 1627293504612
}
Response Parameters​
| Parameter | Type | Comments |
|---|---|---|
| orderId | String | Order ID |
| clientOid | String | Client order ID |