Close All CFD Positions
Close All CFD Positions
Descriptionâ
This endpoint is used to close all positions on a CFD account.
HTTP Requestâ
- POST /api/v3/cfd/trade/close-all-positions
- Rate limit: 1/sec/UID
- Permission: UTA trade (read & write)
Request
curl -X POST "https://api.bitget.com/api/v3/cfd/trade/close-all-positions" \
-H "ACCESS-KEY:your apiKey" \
-H "ACCESS-SIGN:*" \
-H "ACCESS-PASSPHRASE:*" \
-H "ACCESS-TIMESTAMP:1659076670000" \
-H "locale:en-US" \
-H "Content-Type: application/json" \
-d '{"symbol":"XAUUSD"}'
Request Parametersâ
| Parameters | Type | Required | Description |
|---|---|---|---|
| symbol | String | Yes | Trading pair name If not provided, all positions are closed If symbol is provided, only positions for the specified trading pair are closed |
Response
{
"code": "00000",
"msg": "success",
"requestTime": 1740000000000,
"data": null
}
Response Parametersâ
| Parameters | Type | Description |
|---|---|---|
| code | String | Code |
| msg | String | Msg |
| requestTime | String | Timestamp |