Skip to main content
POST
/
api
/
v4
/
collateral-account
/
positions
/
history
Positions History
curl --request POST \
  --url https://whitebit.com/api/v4/collateral-account/positions/history \
  --header 'Content-Type: application/json' \
  --header 'X-TXC-APIKEY: <api-key>' \
  --data '
{
  "market": "BTC_USDT",
  "positionId": 1,
  "request": "{{request}}",
  "nonce": "{{nonce}}"
}
'
[
  {
    "positionId": 111,
    "market": "BTC_USDT",
    "openDate": 1650400589.882613,
    "modifyDate": 1650400589.882613,
    "amount": "0.1",
    "basePrice": "45658.349",
    "realizedFunding": "0",
    "liquidationPrice": null,
    "liquidationState": "margin_call",
    "orderDetail": {
      "id": 97067934,
      "tradeAmount": "0.1",
      "price": "41507.59",
      "tradeFee": "415.07",
      "fundingFee": null,
      "realizedPnl": null
    },
    "positionSide": "LONG"
  }
]

Authorizations

X-TXC-APIKEY
string
header
required

API Key authentication for private endpoints.

Required headers:

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

Body

application/json
market
string
Example:

"BTC_USDT"

positionId
integer
Example:

1

request
string
Example:

"{{request}}"

nonce
string
Example:

"{{nonce}}"

Response

Successful response - returns array of position history

positionId
integer

Position identifier

Example:

111

market
string

Position market

Example:

"BTC_USDT"

openDate
number

Date of position opening in Unix timestamp format

Example:

1650400589.882613

modifyDate
number

Date of position modification (current event) in Unix timestamp format

Example:

1650400589.882613

amount
string

Position amount

Example:

"0.1"

basePrice
string

Base price of position

Example:

"45658.349"

realizedFunding
string

Funding fee for whole position lifetime till current state

Example:

"0"

liquidationPrice
string | null

Liquidation price according to current state of position

Example:

null

liquidationState
enum<string> | null

State of liquidation

Available options:
margin_call,
liquidation
Example:

null

orderDetail
object

Details of order which changes position

positionSide
enum<string>

Position side

Available options:
LONG,
SHORT,
BOTH
Example:

"LONG"