Batch Cancel Orders
Cancel multiple orders in a single request. Supports both single symbol and multiple symbols modes.
HTTP Request
POST /api/v1/spot/trade/batch-cancel-orders
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | Trading pair symbol (required when batchMode is "single") |
| batchMode | string | No | Batch mode: "single" or "multiple" (default: "single") |
| orderList | array | Yes | Array of orders to cancel |
Order List Item Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | Trading pair symbol (required when batchMode is "multiple") |
| orderId | string | Yes | Order ID to cancel |
Request Example
Single Symbol Mode
curl -X POST "https://open-api.bydoxe.com/api/v1/spot/trade/batch-cancel-orders" \
-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 '{
"symbol": "BTCUSDT",
"batchMode": "single",
"orderList": [
{
"orderId": "123456789"
},
{
"orderId": "123456790"
}
]
}'
Multiple Symbols Mode
curl -X POST "https://open-api.bydoxe.com/api/v1/spot/trade/batch-cancel-orders" \
-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 '{
"batchMode": "multiple",
"orderList": [
{
"symbol": "BTCUSDT",
"orderId": "123456789"
},
{
"symbol": "ETHUSDT",
"orderId": "987654321"
}
]
}'
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code |
| msg | string | Response message |
| requestTime | number | Request timestamp in milliseconds |
| data | object | Batch cancel result |
| > successList | array | Array of successfully canceled orders |
| >> orderId | string | Order ID |
| > failureList | array | Array of failed cancellations |
| >> orderId | string | Order ID |
| >> errorMsg | string | Error message |
| >> errorCode | string | Error code |
Response Example
Success Response
{
"code": "00000",
"msg": "success",
"requestTime": 1732000000000,
"data": {
"successList": [
{
"orderId": "123456789"
}
],
"failureList": [
{
"orderId": "987654321",
"errorMsg": "order not found",
"errorCode": "40002"
}
]
}
}
Error Codes
| Code | Message |
|---|---|
| 40001 | Parameter cannot be empty |
| 40001 | Maximum 50 orders allowed |
| 40001 | Symbol is required in single mode |
| 40001 | Symbol is required in orderList for multiple mode |
| 40001 | Missing required parameter: orderId |
| 40002 | Unauthorized |