跳到主要内容

批量撤单

限速规则 5次/1s (UID)

描述

批量撤单

HTTP请求

  • POST /api/v2/spot/trade/batch-cancel-order
请求示例
curl -X POST "https://api.bitget.com/api/v2/spot/trade/batch-cancel-order" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{
"symbol": "",
"batchMode":"multiple",
"orderList": [
{
"orderId":"121211212122",
"symbol":"BTCUSDT",
"clientOid":"121211212122"
}
]
}'

请求参数

参数名参数类型是否必须描述
symbolString交易对名称,如BTCUSDT
batchModeString批量下单模式
single 单币种模式, 默认单币种模式
multiple 跨币种模式.
如选择单币种模式,则orderlist中的symbol不生效
如选择跨币种模式,则orderlist中的symbol生效,且orderlist中的symbol必填。orderlist外的symbol不生效
orderListArray订单id数组,最大长度:50
>symbolString交易对名称,如BTCUSDT
>orderIdStringorderId,与clientOid必填一个
>clientOidStringclientOid,与orderId必填一个
返回示例
{
"code": "00000",
"message": "success",
"requestTime": 1695808949356,
"data": {
"successList": [
{
"orderId": "121211212122",
"clientOid": "121211212122"
}
],
"failureList": [
{
"orderId": "121211212122",
"clientOid": "xxx001",
"errorMsg": "duplicate clientOrderId"
}
]
}
}

返回参数

返回字段参数类型字段说明
successListArray成功订单数组
>orderIdString订单ID
>clientOidString客户端订单ID
failureListArray失败订单数组
>orderIdString订单ID
>clientOidString客户端订单ID
>errorMsgString错误信息
>errorCodeString错误码

您的阅读体验如何?