Close CFD Positions
Close CFD Positions
Descriptionâ
This endpoint is used to close positions on a CFD account. Only market-price closing is currently supported.
HTTP Requestâ
- POST /api/v3/cfd/trade/close-positions
- Rate limit: 10/sec/UID
- Permission: UTA trade (read & write)
Request
curl -X POST "https://api.bitget.com/api/v3/cfd/trade/close-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 '{"positionId":"111111111111111111","qty":"1"}'
Request Parametersâ
| Parameters | Type | Required | Description |
|---|---|---|---|
| positionId | String | Yes | Position ID Can be obtained via the position list endpoint |
| qty | String | Yes | Order quantity |
Response
{
"code": "00000",
"msg": "success",
"requestTime": 1740000000000,
"data": null
}
Response Parametersâ
| Parameters | Type | Description |
|---|---|---|
| code | String | Code |
| msg | String | Msg |
| requestTime | String | Timestamp |