PortfolioAllTimeData

Documentation for eth_defi.hyperliquid.api.PortfolioAllTimeData Python class.

class PortfolioAllTimeData

Bases: object

All-time PnL and trading volume for a Hyperliquid address.

Fetched from the portfolio info endpoint, which works for any address — not just leaderboard participants.

The pnlHistory array in the API response is aggregated data that covers the account’s full lifetime, unlike fills which are capped at ~10K entries per account. The first entry’s timestamp therefore gives a reliable account creation / first activity date.

Returned by fetch_portfolio().

Attributes summary

all_time_pnl

Latest cumulative PnL in USD (from the last entry in pnlHistory)

all_time_volume

All-time trading volume in USD

first_activity_at

Timestamp of the first pnlHistory entry — the account's first recorded activity.

Methods summary

__init__(all_time_pnl, all_time_volume, ...)

all_time_pnl: decimal.Decimal | None

Latest cumulative PnL in USD (from the last entry in pnlHistory)

all_time_volume: decimal.Decimal | None

All-time trading volume in USD

first_activity_at: datetime.datetime | None

Timestamp of the first pnlHistory entry — the account’s first recorded activity. Derived from aggregated data that covers the full account lifetime (not subject to the ~10K fill API cap).

__init__(all_time_pnl, all_time_volume, first_activity_at)
Parameters
Return type

None