fetch_and_store_pool
Documentation for eth_defi.lighter.daily_metrics.fetch_and_store_pool function.
- fetch_and_store_pool(session, db, summary, cutoff_date=None, timeout=30.0)
Fetch a single pool’s details and store metrics in the database.
- Parameters
session (eth_defi.lighter.session.LighterSession) – HTTP session with rate limiting.
db (eth_defi.lighter.daily_metrics.LighterDailyMetricsDatabase) – The metrics database to write into.
summary (eth_defi.lighter.vault.LighterPoolSummary) – Pool summary from the bulk listing.
cutoff_date (Optional[datetime.date]) – If provided, only store price data up to this date.
timeout (float) – HTTP request timeout.
- Returns
Trueif the pool was successfully processed.- Return type