VaultReportData
Documentation for eth_defi.vault_report.data.VaultReportData Python class.
- class VaultReportData
Bases:
objectInput data for the monthly vault report.
Created by
fetch_vault_report_data(). Holds the vault metrics in memory, but only the path of the price Parquet: the file has millions of rows, and the charts read just the vaults and columns they need, seeread_vault_share_prices()andread_vault_tvl_history().Attributes summary
One row per vault, indexed by
{chain_id}-{address}vault id.Path to the cleaned vault price Parquet file used for charts
Strategy category key -> category description, from the top vaults export
categories.The most recent metrics period end across all vaults.
Methods summary
__init__(vaults_df, prices_path[, categories])- vaults_df: pandas.DataFrame
One row per vault, indexed by
{chain_id}-{address}vault id.See
prepare_vault_metrics()for the columns.
- prices_path: pathlib.Path
Path to the cleaned vault price Parquet file used for charts
- categories: dict[str, dict]
Strategy category key -> category description, from the top vaults export
categories. The risk and return chart uses the category labels for its legend.
- property data_end_at: datetime.datetime
The most recent metrics period end across all vaults.
Used as the report date everywhere instead of the wall clock: the stale data filter, the chart windows and the post’s data date are all relative to it, so regenerating the report later from the same export gives the same selections.
- Returns
Naive UTC datetime of the latest vault data point.
- __init__(vaults_df, prices_path, categories=<factory>)
- Parameters
vaults_df (pandas.DataFrame) –
prices_path (pathlib.Path) –
- Return type
None