Batch Place Orders
Create multiple orders in batch, supporting up to 20 orders.
Interface Information
- Method:
POST - Path:
/api/v1/stock/open-api/batchOrder
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| orders | array | Yes | Order list, max 20 orders |
Order object fields:
- symbol: Stock symbol
- side: buy/sell
- type: limit/market
- price: Order price
- quantity: Order quantity
- clientOid: Client-defined ID
Request Example
{
"orders": [
{
"symbol": "AAPL",
"side": "buy",
"type": "limit",
"price": "185.50",
"quantity": "500",
"clientOid": "batch-001"
},
{
"symbol": "TSLA",
"side": "sell",
"type": "limit",
"price": "250.00",
"quantity": "10",
"clientOid": "batch-002"
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| code | int | Status code, 0 indicates success |
| msg | string | Status message |
| data.results | array | Results list |
| results[].orderId | string | Order ID (returned on success) |
| results[].clientOid | string | Client-defined ID |
| results[].success | boolean | Success status |
| results[].errorMsg | string | Error message (returned on failure) |
| results[].errorCode | int | Error code (returned on failure) |
Response Example
{
"code": 0,
"msg": "success",
"data": {
"results": [
{
"orderId": "123456789",
"clientOid": "batch-001",
"success": true
},
{
"orderId": "",
"clientOid": "batch-002",
"success": false,
"errorCode": 1001,
"errorMsg": "Insufficient balance"
}
]
}
}