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
Parameter | Type | Required | Description |
---|---|---|---|
symbol | String | Yes | Trading pair name, e.g. BTCUSDT |
orderList | Array | Yes | Collection of placing orders,maximum length: 50 |
> side | String | Yes | Order Directionbuy : Buysell : Sell |
> orderType | String | Yes | Order type limit : Limit ordermarket : Market order |
> force | String | Yes | Execution strategy(It will be invalid when orderType is market )gtc : Normal limit order, good till cancelledpost_only : Post onlyfok : Fill or killioc : Immediate or cancel |
> price | String | No | Limit price The decimal places of price and the price step can be returned by the Get Symbol Info interface |
> size | String | Yes | Amount 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 |
> clientOid | String | No | Customed order ID. The idempotency time is 6 hours, only valid when orders are unfilled. |
> stpMode | String | No | STP 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
Parameter | Type | Description |
---|---|---|
successList | Array | Successful order number |
>orderId | String | Order ID |
>clientOid | String | Client Order ID |
failureList | Array | Failed order number |
>orderId | String | Order ID |
>clientOid | String | Client Order ID |
>errorMsg | String | Error information |
>errorCode | String | Error code |