跳到主要内容

批量修改订单(TRADE)

接口描述

批量修改订单

HTTP请求

PUT /dapi/v1/batchOrders

请求权重

5

请求参数

名称类型是否必需描述
batchOrderslist<JSON>YES订单列表,最多支持5个订单
recvWindowLONGNO
timestampLONGYES

其中batchOrders应以list of JSON格式填写订单参数

名称类型是否必需描述
orderIdLONGNO系统订单号,orderId 与 origClientOrderId 至少要传一个
origClientOrderIdSTRINGNO用户自定义的订单号,orderId 与 origClientOrderId 至少要传一个
symbolSTRINGYES交易对
sideENUMYES买卖方向 SELL, BUY
quantityDECIMALNO下单数量,使用closePosition不支持此参数。
priceDECIMALNO委托价格
stopPriceDECIMALNO触发价, 仅 STOP, STOP_MARKET, TAKE_PROFIT, TAKE_PROFIT_MARKET 需要此参数
recvWindowLONGNO
timestampLONGYES
  • 具体订单条件规则,与普通修改订单一致
  • 批量修改订单采取并发处理,不保证订单撮合顺序
  • 批量修改订单的返回内容顺序,与订单列表顺序一致

响应示例

[
{
"orderId": 20072994037,
"symbol": "BTCUSD_PERP",
"pair": "BTCUSD",
"status": "NEW",
"clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW",
"price": "30005",
"avgPrice": "0.0",
"origQty": "1",
"executedQty": "0",
"cumQty": "0",
"cumBase": "0",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "BUY",
"positionSide": "LONG",
"stopPrice": "0",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"priceMatch": "NONE",
"selfTradePreventionMode": "NONE",
"updateTime": 1629182711600
},
{
"code": -2022,
"msg": "ReduceOnly Order is rejected."
}
]