scan_vaults
Documentation for eth_defi.grvt.vault_scanner.scan_vaults function.
- scan_vaults(session=None, db_path=PosixPath('/home/runner/.tradingstrategy/grvt/vaults.duckdb'), timeout=30.0, only_discoverable=True)
Scan all GRVT vaults and store snapshots in DuckDB.
Discovers vaults via the public GraphQL API (includes per-vault fees), enriched with live data from the market data API. No authentication required.
Example:
from eth_defi.grvt.vault_scanner import scan_vaults db = scan_vaults() df = db.get_latest_snapshots() print(f"Scanned {len(df)} vaults") db.close()- Parameters
session (requests.sessions.Session | None) – HTTP session. If None, one is created via
create_grvt_session().db_path (pathlib.Path) – Path to the DuckDB database file.
timeout (float) – HTTP request timeout in seconds.
only_discoverable (bool) – If True, only scan vaults marked as discoverable.
- Returns
VaultSnapshotDatabase instance with the newly inserted snapshots.
- Return type