Skip to main content

Batch Cancel and Replace Orders

Cancel multiple existing orders and immediately replace them with new orders in a single atomic operation.

HTTP Request

POST /api/v1/spot/trade/batch-cancel-replace-order

Request Parameters

ParameterTypeRequiredDescription
orderListarrayYesArray of orders to cancel/replace

Order List Item Parameters

ParameterTypeRequiredDescription
symbolstringYesTrading pair symbol (e.g., BTCUSDT)
orderIdstringYesOrder ID to cancel and replace
pricestringYesNew order price
sizestringYesNew order size

Request Example

curl -X POST "https://open-api.bydoxe.com/api/v1/spot/trade/batch-cancel-replace-order" \
-H "ACCESS-KEY: your-api-key" \
-H "ACCESS-SIGN: your-signature" \
-H "ACCESS-PASSPHRASE: your-passphrase" \
-H "ACCESS-TIMESTAMP: 1659076670000" \
-H "Content-Type: application/json" \
-d '{
"orderList": [
{
"symbol": "BTCUSDT",
"orderId": "123456789",
"price": "90500.00",
"size": "0.002"
},
{
"symbol": "ETHUSDT",
"orderId": "987654321",
"price": "3450.00",
"size": "0.5"
}
]
}'

Response Parameters

ParameterTypeDescription
codestringResponse code
msgstringResponse message
requestTimenumberRequest timestamp in milliseconds
dataarrayArray of cancel-replace results
> orderIdstringNew order ID
> successstringOperation status for this order
> msgstringAdditional message (if any)

Response Example

Success Response

{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": [
{
"orderId": "123456789",
"success": "success",
"msg": null
},
{
"orderId": "987654321",
"success": "success",
"msg": null
}
]
}

Error Codes

CodeMessage
40001Parameter cannot be empty
40001Maximum 50 orders allowed
40002Unauthorized