Skip to main content

Modify Multiple Orders(TRADE)

API Description​

Modify Multiple Orders

HTTP Request​

PUT /dapi/v1/batchOrders

Request Weight​

5

Request Parameters​

NameTypeMandatoryDescription
batchOrderslist<JSON>YESorder list. Max 5 orders
recvWindowLONGNO
timestampLONGYES

Where batchOrders is the list of order parameters in JSON

NameTypeMandatoryDescription
orderIdLONGNO
origClientOrderIdSTRINGNO
symbolSTRINGYES
sideENUMYESSELL, BUY
quantityDECIMALNOOrder quantity, cannot be sent with closePosition=true.
After CM migration, this parameter becomes mandatory (each batch element must send both price and quantity).
priceDECIMALNOAfter CM migration, this parameter becomes mandatory (each batch element must send both price and quantity).
modifyIdINTNOUser-defined modification identifier, returned as-is in the response. Optional; not validated for uniqueness.
recvWindowLONGNO
timestampLONGYES
  • Parameter rules are same with Modify Order
  • Batch modify orders are processed concurrently, and the order of matching is not guaranteed.
  • The order of returned contents for batch modify orders is the same as the order of the order list.
  • One order can only be modfied for less than 10000 times
  • modifyId is an optional user-defined identifier passed through as-is; the server does not validate its uniqueness. If omitted, it is not included in the response.

Response Example​

[
{
"orderId": 20072994037,
"symbol": "BTCUSD_PERP",
"pair": "BTCUSD",
"status": "NEW",
"clientOrderId": "LJ9R4QZDihCaS8UAOOLpgW",
"modifyId": 1, //user-defined modification identifier, only returned if provided in the request
"price": "30005",
"origQty": "1",
"executedQty": "0",
"cumQty": "0",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"closePosition": false,
"side": "BUY",
"positionSide": "LONG",
"stopPrice": "0",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"priceMatch": "NONE", //price match mode
"selfTradePreventionMode": "EXPIRE_MAKER", //self trading preventation mode
"updateTime": 1629182711600
},
{
"code": -2022,
"msg": "ReduceOnly Order is rejected."
}
]