Skip to main content
POST
/
api
/
v4
/
collateral-account
/
position
/
close
Close Position
curl --request POST \
  --url https://whitebit.com/api/v4/collateral-account/position/close \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --data '
{
  "positionId": 123,
  "market": "<string>",
  "request": "<string>",
  "nonce": "<string>",
  "positionSide": "long"
}
'

Authorizations

X-TXC-APIKEY
string
header
required

API Key authentication for private endpoints.

Required headers:

  • X-TXC-APIKEY: Your API key
  • X-TXC-PAYLOAD: Base64 encoded JSON payload
  • X-TXC-SIGNATURE: HMAC SHA512 signature

Body

application/json
positionId
integer
required
market
string
required
request
string
required
nonce
string
required
positionSide
enum<string>
Available options:
long,
short

Response

200

Position closed