Restrictions:
- The symbol must be identical within the same batch
- At most 10 orders
MARKET Order Combinations:
| Side | Amount | Quantity | Order Basis |
|---|---|---|---|
| BUY | Y | Y | Order by amount (includes fee) |
| BUY | Y | N | Order by amount (includes fee) |
| BUY | N | Y | Order by quantity |
| SELL | Y | Y | Order by quantity |
| SELL | Y | N | Order by amount |
| SELL | N | Y | Order by quantity |
In MARKET buy scenarios, amount includes trading fees.
Request:
{
"id": "3",
"op": "batch-orders",
"args": {
"batchOrders": [
{
"symbol": "BTCUSDC",
"side": "BUY",
"type": "LIMIT",
"price": "60000",
"quantity": "0.01",
"timeInForce": "GTC",
"newClientOrderId": "my-order-001"
}
]
}
}Fields for each order in batchOrders:
| Field | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Trading pair |
| side | string | Yes | BUY / SELL |
| type | string | Yes | LIMIT / MARKET |
| price | string | Required for LIMIT | Order price |
| quantity | string | Required for LIMIT | Quantity |
| amount | string | Conditionally required | Amount (available for MARKET orders) |
| timeInForce | string | No | GTC/IOC/FOK/POST_ONLY/GTD; defaults to GTC for LIMIT and IOC for MARKET |
| newClientOrderId | string | No | Client order ID, format [a-zA-Z0-9-_.], max length 100 |
| selfTradePreventionMode | string | No | Self-trade prevention mode |
| expireTime | long | Required for GTD | Expiration timestamp (milliseconds); required when timeInForce is GTD, must be a future time |
Success response:
{
"id": "3",
"op": "batch-orders",
"code": 0,
"data": [
{
"category": "SPOT",
"orderId": "2269150830932668416",
"clientOrderId": "my-order-001",
"symbol": "BTCUSDC",
"type": "LIMIT",
"timeInForce": "GTC",
"side": "BUY",
"origQty": "0.01000000",
"price": "60000.00000000",
"executedQty": "0.00000000",
"status": "NEW",
"cumQuote": "0.00000000",
"avgPrice": null,
"updateTime": "1785239858440"
}
],
"inTime": 1787060806850,
"outTime": 1787060806856
}The corresponding element in data when a single order fails:
{
"code": -5212,
"msg": "clientOrderId duplicate",
"clientOrderId": "my-order-001"
}