PortfolioAllTimeData
Documentation for eth_defi.hyperliquid.api.PortfolioAllTimeData Python class.
- class PortfolioAllTimeData
Bases:
objectAll-time PnL and trading volume for a Hyperliquid address.
Fetched from the
portfolioinfo endpoint, which works for any address — not just leaderboard participants.The
pnlHistoryarray 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
Latest cumulative PnL in USD (from the last entry in
pnlHistory)All-time trading volume in USD
Timestamp of the first
pnlHistoryentry — the account's first recorded activity.Methods summary
__init__(all_time_pnl, all_time_volume, ...)- all_time_pnl: Optional[decimal.Decimal]
Latest cumulative PnL in USD (from the last entry in
pnlHistory)
- all_time_volume: Optional[decimal.Decimal]
All-time trading volume in USD
- first_activity_at: Optional[datetime.datetime]
Timestamp of the first
pnlHistoryentry — 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
all_time_pnl (Optional[decimal.Decimal]) –
all_time_volume (Optional[decimal.Decimal]) –
first_activity_at (Optional[datetime.datetime]) –
- Return type
None