Skip to main content

Batch Place Orders

Frequency limit: 5 times/1s (UID)Trader frequency limit: 1 times/1s (UID)

Description

Place Orders in Batch

HTTP Request

  • POST /api/v2/spot/trade/batch-orders
Request Example
curl -X POST "https://api.cointr.com/api/v2/spot/trade/batch-orders" \
-H "ACCESS-KEY:*******" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{"symbol":"BTCUSDT","orderList":[{"side":"buy","orderType":"limit","force":"gtc","price":"23222.5","size":"1","clientOid":"121211212122"}] }'

Request Parameter

ParameterTypeRequiredDescription
symbolStringYesTrading pair name, e.g. BTCUSDT
orderListArrayYesCollection of placing orders,maximum length: 50
> sideStringYesOrder Direction
buy: Buy
sell: Sell
> orderTypeStringYesOrder type
limit: Limit order
market: Market order
> forceStringYesExecution strategy(It will be invalid when orderType is market)
gtc: Normal limit order, good till cancelled
post_only: Post only
fok: Fill or kill
ioc: Immediate or cancel
> priceStringNoLimit price
The decimal places of price and the price step can be returned by the Get Symbol Info interface
> sizeStringYesAmount
For Limit and Market-Sell orders, it represents the number of base coins.
For Market-Buy orders, it represents the number of quote coins.
The decimal places of amount can be got trough Get Symbol Info interface
> clientOidStringNoCustomed order ID. The idempotency time is 6 hours, only valid when orders are unfilled.
> stpModeStringNoSTP Mode, default none
none not setting STP
cancel_taker cancel taker order
cancel_maker cancel maker order
cancel_both cancel both of taker and maker orders
Response Example
{
"code": "00000",
"msg": "success",
"requestTime": 1666336231317,
"data": {
"successList": [
{
"orderId": "121211212122",
"clientOid": "1"
}
],
"failureList": [
{
"orderId": "121211212122",
"clientOid": "1",
"errorMsg": "clientOrderId duplicate"
}
]
}
}

Response Parameter

ParameterTypeDescription
successListArraySuccessful order number
>orderIdStringOrder ID
>clientOidStringClient Order ID
failureListArrayFailed order number
>orderIdStringOrder ID
>clientOidStringClient Order ID
>errorMsgStringError information
>errorCodeStringError code