export_lifetime_row
Documentation for eth_defi.research.vault_metrics.export_lifetime_row function.
- export_lifetime_row(row)
Export lifetime metrics row to a fully JSON-serialisable dict.
Recursively handles nested dicts, lists, tuples, sets, and dataclasses.
Normalises pandas, numpy, datetime, and custom types.
Converts finite
Decimalvalues to JSON number floats.Preserves legacy fee field names.
The
denomination_token_ratedataclass frometh_defi.feed.stablecoin_rate.DenominationTokenRateis converted to JSON fields here. This includesusd_rate/usd_rate_fetched_atfor all stablecoins andnative_rate/native_rate_fetched_atonly when the native source currency is not USD.- Parameters
row (pandas.Series) –
- Return type