Flash Close Position
Frequency limit: 1 time/1s (User ID)
Description
close position at market price
HTTP Request
- POST /api/v2/mix/order/close-positions
Request Example
curl -X POST "https://api.cointr.com/api/v2/mix/order/close-positions" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:zh-CN" \
-H "Content-Type: application/json" \
-d '{"symbol": "BTCUSDT","productType":"usdt-futures","holdSide": "long"}'
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
symbol | String | No | Trading pair |
holdSide | String | Optional | Position direction 1. Buy or sell (one-way position) mode: May be left blank. Will be ignored if filled in. 2. In open and close mode (hedge mode position): All positions will be closed if the field is left blank; Positions of the specified direction will be closed is the field is filled in. Long; Short |
productType | String | Yes | Product typeUSDT-FUTURES USDT professional futuresCOIN-FUTURES Mixed futuresUSDC-FUTURES USDC professional futuresSUSDT-FUTURES USDT professional futures demoSCOIN-FUTURES Mixed futures demoSUSDC-FUTURES USDC professional futures demo |
Response Example
{
"code": "00000",
"data": {
"successList": [
{
"orderId": "123",
"clientOid": "xxxxx"
}
],
"failureList": [
{
"orderId": "1234",
"clientOid": "321",
"errorMsg": "clientOrderId duplicate ",
"errorCode": "43118"
}
]
},
"msg": "success",
"requestTime": 1627293504612
}
Response Parameters
Parameter | Type | Description |
---|---|---|
successList | List<Object> | The collection of successfully cancelled orders. |
>orderId | String | Order ID |
>clientOid | String | Customize order ID |
failureList | List<Object> | The collection of unsuccessfully cancelled orders. |
>orderId | String | Order ID |
>clientOid | String | Customize order ID |
>errorMsg | String | Failure reason |
>errorCode | String | Failure code |