Get account balance history

This endpoint allows users to get account balance history. Returns all balance effects that affects the queried account.

GET /api/v1/account/balance/history

Query Parameters

Field
Type
Need
Description
Example

"account"

string

required

User's wallet address

42trU9A5...

"limit"

integer

optional

Maximum number of records to return, defaults to system defined limit

100

"offset"

integer

optional

Number of records to skip, defaults to 0

0

/api/v1/account/balance/history?account=42trU9A5...

Response

  • Status 200: Successfully retrieved balance history

{
  "success": true,
  "data": [
    {
      "amount": "100.000000",
      "balance": "1200.000000",
      "pending_balance": "0.000000",
      "event_type": "deposit",
      "created_at": 1716200000000
    }
  ]
}
Field
Type
Description

'amount'

decimal string

Amount change to balance after event

'balance'

decimal string

Account balance after event

'pending_balance'

decimal string

Pending balance after event

'event_type'

string

Type of balance event (see below)

'created_at'

integer

Timestamp in milliseconds of when the balance event occured

Event Type (String)
Description

'deposit'

Deposit funds to account

'deposit_release'

Release of previously pending deposit

'withdraw'

Withdrawal of funds from account

'trade'

Trading activity (fees, realized PnL)

'market_liquidation'

Liquidation by market orders

'backstop_liquidation'

Liquidation by backstop liquidator

'adl_liquidation'

Liquidation by auto-deleveraging

'subaccount_transfer'

Transfer between subaccounts

'funding'

Funding payment

'payout'

Payout event (from e.g. affiliate program)

  • Status 400: Invalid request parameters

  • Status 401: Unauthorized access

  • Status 500: Internal server error

Code Example (Python)

import requests

response = requests.get(
    "/api/v1/portfolio?account/balance/history?account=42trU9A5..."
    headers={"Accept": "*/*"},
)

data = response.json()

Last updated