批量修改订单(TRADE)
接口描述
批量修改订单
HTTP请求
PUT /dapi/v1/batchOrders
请求权重
5
请求参数
名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
batchOrders | list<JSON> | YES | 订单列表,最多支持5个订单 |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
其中batchOrders
应以list of JSON格式填写订单参数
名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
orderId | LONG | NO | 系统订单号,orderId 与 origClientOrderId 至少要传一个 |
origClientOrderId | STRING | NO | 用户自定义的订单号,orderId 与 origClientOrderId 至少要传一个 |
symbol | STRING | YES | 交易对 |
side | ENUM | YES | 买卖方向 SELL , BUY |
quantity | DECIMAL | NO | 下单数量,使用closePosition 不支持此参数。 |
price | DECIMAL | NO | 委托价格 |
stopPrice | DECIMAL | NO | 触发价, 仅 STOP , STOP_MARKET , TAKE_PROFIT , TAKE_PROFIT_MARKET 需要此参数 |
recvWindow | LONG | NO | |
timestamp | LONG | YES |
- 具体订单条件规则,与普通修改订单一致
- 批量修改订单采取并发处理,不保证订单撮合顺序
- 批量修改订单的返回内容顺序,与订单列表顺序一致
响应示例
[
{
"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."
}
]