Close Positions
Flash close positions at market price for a specific symbol or all positions.
HTTP Request
POST /api/v1/future/order/close-positions
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | No | Trading pair symbol (if omitted, closes all positions) |
| holdSide | string | No | Position side to close: "LONG" or "SHORT" (if omitted, closes both) |
Request Example
Close Specific Position
curl -X POST "https://open-api.bydoxe.com/api/v1/future/order/close-positions" \
-H "ACCESS-KEY: your-api-key" \
-H "ACCESS-SIGN: your-signature" \
-H "ACCESS-PASSPHRASE: your-passphrase" \
-H "ACCESS-TIMESTAMP: 1659076670000" \
-H "Content-Type: application/json" \
-d '{
"symbol": "BTCUSDT",
"holdSide": "LONG"
}'
Close All Positions
curl -X POST "https://open-api.bydoxe.com/api/v1/future/order/close-positions" \
-H "ACCESS-KEY: your-api-key" \
-H "ACCESS-SIGN: your-signature" \
-H "ACCESS-PASSPHRASE: your-passphrase" \
-H "ACCESS-TIMESTAMP: 1659076670000" \
-H "Content-Type: application/json" \
-d '{}'
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | string | Response code |
| msg | string | Response message |
| requestTime | number | Request timestamp in milliseconds |
| data | object | Flash close result |
| > successList | array | Array of successfully closed positions |
| >> orderId | string | Closing order ID |
| >> clientOid | string | Client order ID |
| >> symbol | string | Trading pair symbol |
| > failureList | array | Array of failed closures |
Response Example
Success Response
{
"code": "00000",
"msg": "success",
"requestTime": 1763459280000,
"data": {
"successList": [
{
"orderId": "fu-123456789",
"clientOid": "flash-close-001",
"symbol": "BTCUSDT"
}
],
"failureList": []
}
}
Error Codes
No specific errors - returns success with empty lists if no positions