Skip to main content

Submit batch order

Type POST

Description: /v4/batch-order


Parameters

NameTypeMandatoryDefaultDescriptionRanges
clientBatchIdstringNoN/AClient batch number. Pattern: ^[a-zA-Z0-9_]{4,32}$
itemsarrayYesN/AArray
item.symbolstringYesN/ATrading pair
item.clientOrderIdstringNoN/APattern: ^[a-zA-Z0-9_]{4,32}$
item.sidestringYesN/AOrder sideBUY, SELL
item.typestringYesN/AOrder typeLIMIT, MARKET
item.timeInForcestringYesN/AEffective wayGTC, FOK, IOC, GTX
item.bizTypestringYesN/ABusiness typeSPOT, LEVER
item.pricenumberNoN/APrice. Required if it is LIMIT; blank if it is MARKET
item.quantitynumberNoN/AQuantity. Required if it is LIMIT or MARKET by quantity
item.quoteQtynumberNoN/AAmount. Required if it is LIMIT or MARKET by amount

Limit Flow Rules

  • 30/s/apikey

Parameters Example

curl --location --request POST 'https://sapi.xt.com/v4/batch-order' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \
--header 'validate-algorithms: HmacSHA256' \
--header 'validate-recvwindow: 60000' \
--header 'validate-appkey: xxxxxxxxxx' \
--header 'validate-timestamp: xxxxxxxxxx' \
--header 'validate-signature: xxxxxxxxxx' \
--data '{
"clientBatchId": "xxxxxxxxxx",
"items": [
{
"symbol": "XT_USDT",
"clientOrderId": "xxxxxxxxxx",
"side": "BUY",
"type": "LIMIT",
"timeInForce": "GTC",
"bizType": "SPOT",
"price": 10,
"quantity": 1
}
]
}'

Request Example

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

Response Example

Request
{
"rc": 0,
"mc": "string",
"ma": [{}],
"result": {
"batchId": "123",
"items": [
{
"index": "0", // start with 0
"clientOrderId": "123",
"orderId": "123",
"reject": "false",
"reason": "invalid price precision"
}
]
}
}