Skip to main content

Batch Cancel Existing Order and Send New Orders

Rate limit: 5 requests/second/UID

Description

Cancel an Existing Order and Send a New Order

HTTP Request

  • POST /api/v2/spot/trade/batch-cancel-replace-order
Request Example
curl -X POST "https://api.bitget.com/api/v2/spot/trade/batch-cancel-replace-order" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*******" \
-H "ACCESS-PASSPHRASE:*****" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{
"orderList": [
{
"orderId":"xxxxxxxxxxxxxxxxx",
"clientOid":"",
"symbol": "BTCUSDT",
"price":"3.17",
"size":"5"
}
]
}'

Request Parameter

ParameterTypeRequiredDescription
orderListArrayYesCollection of placing orders,maximum length: 50
> symbolStringYesTrading pair name, e.g. BTCUSDT
All symbols can be returned by Get Symbol Info interface
> priceStringYesLimit price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
> sizeStringYesAmount,it represents the number of base coins.
> clientOidStringNoClient Order ID
Either orderId or clientOid is required
> orderIdStringNoOrder ID
Either orderId or clientOid is required
> newClientOidStringNoNew customed order ID. The idempotency time is 6 hours, only valid when orders are unfilled.
> presetTakeProfitPriceStringNoTake profit price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
> executeTakeProfitPriceStringNoTake profit execute price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
> presetStopLossPriceStringNoStop loss price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
> executeStopLossPriceStringNoStop loss execute price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
Response Example
{
"code": "00000",
"msg": "success",
"requestTime": 1725341809524,
"data": [
{
"orderId": "xxxxxxxxxxxxxxxxxxxxxx",
"clientOid": null,
"success": "failure",
"msg": "xxxxxx"
}
]
}

Response Parameter

ParameterTypeDescription
orderIdStringOrder ID
clientOidStringCLient Order ID
successStringoperate success
success: success
failure: failure
msgStringFailure reason

How was your Reading Experience with us?