批量下单
HTTP请求 批量下单
- POST /api/v2/trade/batch-orders
权重(IP): 5, 权重(UID): 10
请求参数
| 参数名 | 参数类型 | 是否必须 | 描述 | 
|---|---|---|---|
| symbol | String | 是 | 币对,具体见:/products | 
| orderList | List | 是 | 下单集合 | 
- orderList参数
| 参数名 | 参数类型 | 是否必须 | 描述 | 
|---|---|---|---|
| side | String | 是 | 交易方向 buy:买入 sell:卖出 | 
| orderType | String | 是 | 交易类型 limit:限价 market:市价 | 
| force | String | 是 | 订单控制类型(orderType为market时无效) normal:普通限价单,一直有效直至取消 postOnly:只做 maker 订单 fok:全部成交或立即取消 ioc:立即成交并取消剩余 | 
| price | String | 否 | 限价价格(orderType为limit必填) | 
| quantity | String | 是 | 委托数量 | 
| clientOrderId | String | 是 | 自定义id | 
请求示例
curl -X POST "https://api-spot.weex.com/api/v2/trade/batch-orders" \
   -H "ACCESS-KEY:*******" \
   -H "ACCESS-SIGN:*******" \
   -H "ACCESS-PASSPHRASE:*****" \
   -H "ACCESS-TIMESTAMP:1659076670000" \
   -H "locale:zh-CN" \
   -H "Content-Type: application/json" \
   -d '{"symbol": "BTCUSDT_SPBL",
	"orderList": [{
		"side": "sell",
		"orderType": "limit",
		"force": "normal",
		"price": "100000",
		"quantity": "1",
		"clientOrderId": "202504041144444401743738284072"
	}]}'
返回参数
| 字段名 | 类型 | 字段说明 | 
|---|---|---|
| resultList | array | array | 
| >orderId | Long | 订单id | 
| >clientOrderId | String | 自定义id | 
返回示例
{
  "code": "00000",
  "msg": "success",
  "requestTime": 1743738287975,
  "data": {
    "resultList": [{
      "orderId": 602882076026339770,
      "clientOrderId": "202504041144444401743738284072"
    }]
  }
}