Skip to main content
Close Position

Authorizations

X-TXC-APIKEY
string
header
required

The public WhiteBIT API key.

X-TXC-PAYLOAD
string
header
required

Base64-encoded JSON request body.

X-TXC-SIGNATURE
string
header
required

HMAC-SHA512 signature of the payload, hex-encoded. Computed as hex(HMAC-SHA512(payload, api_secret)).

Body

application/json
positionId
integer
required

Unique identifier of the position to close. Obtain from the open positions endpoint.

Example:

123

market
string
required

Market of the position to close. Example: BTC_USDT

Example:

"BTC_USDT"

request
string
required
Example:

"{{request}}"

nonce
integer
required
Example:

1594297865000

positionSide
enum<string>

Defines the position direction when hedge mode is enabled. See positionSide

Available options:
LONG,
SHORT,
BOTH
Example:

"LONG"

Response

Position closed