merge_into_vault_database
Documentation for eth_defi.hyperliquid.vault_data_export.merge_into_vault_database function.
- merge_into_vault_database(db, vault_db_path)
Merge Hyperliquid vault metadata into an existing VaultDatabase pickle.
Reads the existing pickle, upserts Hyperliquid VaultRow entries (keyed by VaultSpec), and writes back. Idempotent: running twice produces the same result.
If the pickle file does not exist, creates a new VaultDatabase.
- Parameters
db (eth_defi.hyperliquid.daily_metrics.HyperliquidDailyMetricsDatabase) – The Hyperliquid daily metrics database.
vault_db_path (pathlib.Path) – Path to the VaultDatabase pickle file.
- Returns
The updated VaultDatabase.
- Return type