Skip to main content

Batch Place Orders

Batch Place Orders

Submit up to 5 orders in a single request. Each order is executed independently, and a failure in one item does not affect the others.

Request URL

POST /deepcoin/v2/trade/batch-orders

Request Parameters

Request body:

Field NameRequiredTypeDescription
orderstruearrayOrder list, maximum 5 items per request

Order item fields:

Field NameRequiredTypeDescription
instIdtruestringProduct ID
tdModetruestringTrading mode
Cross: cross
Isolated: isolated
ccyfalsestringMargin currency, only applicable to cross margin orders in single-currency margin mode
sidetruestringOrder side
Buy: buy
Sell: sell
posSidefalsestringPosition side
Required when product type is SWAP
Long: long
Short: short
mrgPositionfalsestringPosition mode
Required when product type is SWAP
Merged: merge
Split: split
closePosIdfalsestringPosition ID to close, required in split mode
ordTypetruestringOrder type
Market: market
Limit: limit
Post only: post_only
IOC: ioc
sztruestringOrder size, get minimum order size (minSz) through Get Product Info API
pxfalsestringOrder price, only applicable to limit and post_only orders
reduceOnlyfalsebooleanReduce-only flag
tgtCcyfalsestringMarket order quantity type for spot orders
base_ccy / quote_ccy
tpTriggerPxfalsestringTake profit trigger price
slTriggerPxfalsestringStop loss trigger price

Request Example

{
"orders": [
{
"instId": "BTC-USDT-SWAP",
"tdMode": "cross",
"side": "buy",
"ordType": "limit",
"sz": "1",
"px": "65000",
"posSide": "long",
"mrgPosition": "merge"
},
{
"instId": "ETH-USDT-SWAP",
"tdMode": "cross",
"side": "sell",
"ordType": "market",
"sz": "2",
"posSide": "short",
"mrgPosition": "merge"
}
]
}

Response Parameters

The data field is an array, and each item corresponds to the same index in the request orders.

Field NameTypeDescription
ordIdstringOrder ID. Empty string when placement fails
sCodestringPer-order execution result code, 0 means success
sMsgstringPer-order error message

Response Example

{
"code": "0",
"msg": "",
"data": [
{
"ordId": "1000587866646229",
"sCode": "0",
"sMsg": ""
},
{
"ordId": "",
"sCode": "36",
"sMsg": "InsufficientMoney"
}
]
}