跳至主要内容

批量下單

POST

/az/spot/batch-order

限流規則​

30/s/apikey

請求參數​

參數類型是否必須默認值描述取值範圍
clientBatchIdstringfalse客戶端批次號,正則:^[a-zA-Z0-9_]{4,32}$
itemsarraytrue集合
item.symbolstringtrue交易對
item.clientOrderIdstringfalse客戶端ID,正則:^[a-zA-Z0-9_]{4,32}$
item.sidestringtrue訂單方向 BUY-買,SELL-賣
item.typestringtrue訂單類型 LIMIT-限價,MARKET-市價
item.timeInForcestringtrue有效方式 GTC,IOC,FOK,GTX
item.bizTypestringtrue業務類型 SPOT-現貨, PREDICTION-預測市場
item.pricenumberfalse價格。現價必填; 市價不填
item.quantitynumberfalse數量。現價必填;市價按數量下單時必填
item.quoteQtynumberfalse金額。現價不填;市價按金額下單時必填
item.outcomenumberfalse預測市場結局資產[1=YES;2=NO](bizType=PREDICTION 必填)
item.slippagenumberfalseRFQ 滑點。範例:0.01

Request

{
"clientBatchId": "51232",
"items": [
{
"symbol": "BTC_USDT",
"clientOrderId": "16559590087220001",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"bizType": "SPOT",
"price": 40000,
"quantity": 2,
"quoteQty": 80000
}
]
}

Response

{
"rc": 0,
"mc": "string",
"ma": [
{}
],
"result": {
"batchId": "123", // 批次號
"items": [ //訂單集合
{
"index": "0", // 下標,從0開始
"clientOrderId": "123", // 客戶端訂單ID
"orderId": "123", // 訂單ID
"rejected": false, // 是否拒單
"reason": "invalid price precision" // 拒單原因
}
]
}
}