LighterPoolDailyPnl

Documentation for eth_defi.lighter.vault.LighterPoolDailyPnl Python class.

class LighterPoolDailyPnl

Bases: object

One daily Lighter pool PnL observation.

The Lighter PnL endpoint exposes cumulative flow counters rather than individual deposit and withdrawal events. Keep the source counters intact until export, where adjacent complete-day observations can be safely differenced.

Attributes summary

date

UTC calendar date of the observation

total_shares

Outstanding pool shares at the observation

cumulative_pool_inflow

Cumulative pool deposits in the deployment's collateral currency

cumulative_pool_outflow

Cumulative pool withdrawals in the deployment's collateral currency

cumulative_account_inflow

Cumulative account-level inflow

cumulative_account_outflow

Cumulative account-level outflow

cumulative_spot_inflow

Cumulative spot-account inflow

cumulative_spot_outflow

Cumulative spot-account outflow

cumulative_staking_inflow

Cumulative staking inflow

cumulative_staking_outflow

Cumulative staking outflow

trade_pnl

Source trade PnL value

trade_spot_pnl

Source spot-trade PnL value

pool_pnl

Source pool PnL value

staking_pnl

Source staking PnL value

volume

Source trading-volume value

Methods summary

__init__(date, total_shares, ...)

date: datetime.date

UTC calendar date of the observation

total_shares: Optional[int]

Outstanding pool shares at the observation

cumulative_pool_inflow: Optional[float]

Cumulative pool deposits in the deployment’s collateral currency

cumulative_pool_outflow: Optional[float]

Cumulative pool withdrawals in the deployment’s collateral currency

cumulative_account_inflow: Optional[float]

Cumulative account-level inflow

cumulative_account_outflow: Optional[float]

Cumulative account-level outflow

cumulative_spot_inflow: Optional[float]

Cumulative spot-account inflow

cumulative_spot_outflow: Optional[float]

Cumulative spot-account outflow

cumulative_staking_inflow: Optional[float]

Cumulative staking inflow

cumulative_staking_outflow: Optional[float]

Cumulative staking outflow

trade_pnl: Optional[float]

Source trade PnL value

trade_spot_pnl: Optional[float]

Source spot-trade PnL value

pool_pnl: Optional[float]

Source pool PnL value

staking_pnl: Optional[float]

Source staking PnL value

volume: Optional[float]

Source trading-volume value

__init__(date, total_shares, cumulative_pool_inflow, cumulative_pool_outflow, cumulative_account_inflow, cumulative_account_outflow, cumulative_spot_inflow, cumulative_spot_outflow, cumulative_staking_inflow, cumulative_staking_outflow, trade_pnl, trade_spot_pnl, pool_pnl, staking_pnl, volume)
Parameters
Return type

None