# 批量下单 (TRADE)

- **POST** ```/api/v3/order/batch```

<strong>请求权重</strong>

10s order rate limit(X-ORDER-COUNT-10S)为5; 1min order rate limit(X-ORDER-COUNT-1M)为5; IP rate limit(X-USED-WEIGHT-1M)为0

<div class='api-content-wrap'>
<div>

<strong>请求参数</strong>


| 参数名       | 类型                  | 是否必填   | 说明                |
|-----------|---------------------|--------|-------------------|
| symbol    | String              | 是      | 交易对，例如 `BTCUSDT`。 |
| orderList | Array&lt;Object&gt; | 是      | 最多 10 笔订单。        |

`orderList` 中每个元素支持以下字段：

| 字段名              | 类型     | 是否必填   | 说明                                       |
|------------------|--------|--------|------------------------------------------|
| side             | String | 是      | `BUY` 或 `SELL`。                          |
| type             | String | 是      | `LIMIT` 或 `MARKET`。                      |
| timeInForce      | String | 条件必填   | `type = LIMIT` 时必填，可选 `GTC`、`IOC`、`FOK`。 |
| quantity         | String | 是      | 下单数量。                                    |
| price            | String | 条件必填   | 限价单价格。                                   |
| newClientOrderId | String | 否      | 客户自定义订单号。                                |

</div>
<div class='api-align'>
  <div class='code-wrap'>
<strong>请求示例</strong>

```powershell
curl -X POST "https://api-spot.weex.com/api/v3/order/batch" \
   -H "ACCESS-KEY:*******" \
   -H "ACCESS-SIGN:*******" \
   -H "ACCESS-PASSPHRASE:*****" \
   -H "ACCESS-TIMESTAMP:1659076670000" \
   -H "Content-Type: application/json" \
   -d '{
     "symbol": "BTCUSDT",
     "orderList": [
       {
         "side": "BUY",
         "type": "LIMIT",
         "timeInForce": "GTC",
         "quantity": "0.01",
         "price": "68850",
         "newClientOrderId": "batch-1"
       },
       {
         "side": "SELL",
         "type": "MARKET",
         "quantity": "0.02",
         "newClientOrderId": "batch-2"
       }
     ]
   }'
```
  </div>
  </div>

</div>

<div class='api-content-wrap'>
  <div>
<strong>返回参数</strong>


| 字段名             | 类型                  | 说明            |
|-----------------|---------------------|---------------|
| orderList       | Array&lt;Object&gt; | 每笔订单的执行结果。    |
| → symbol        | String              | 交易对。          |
| → orderId       | Long                | 成功时返回的订单 ID。  |
| → clientOrderId | String              | 客户自定义订单号。     |
| → transactTime  | Long                | 订单被接受的时间（毫秒）。 |
| → errorCode     | String              | 失败时的错误码。      |
| → errorMsg      | String              | 失败时的错误信息。     |

  </div>
  <div class='api-align'>

  <div class='code-wrap'>
<strong>返回示例</strong>

```json
{
  "orderList": [
    {
      "symbol": "BTCUSDT",
      "orderId": 702345678901234700,
      "clientOrderId": "batch-1",
      "transactTime": 1764506000456
    },
    {
      "symbol": "BTCUSDT",
      "clientOrderId": "batch-2",
      "errorCode": "INSUFFICIENT_BALANCE",
      "errorMsg": "insufficient balance"
    }
  ]
}
```
  </div>
    </div>
</div>
