merge_hypercore_prices_to_parquet
Documentation for eth_defi.hyperliquid.vault_data_export.merge_hypercore_prices_to_parquet function.
- merge_hypercore_prices_to_parquet(parquet_path, daily_db=None, hf_db=None)
Merge Hypercore price data from one or both DuckDB databases into the Parquet.
Reads data from whichever databases are provided, combines them (deduplicating on
(address, timestamp)), removes old chain-9999 rows from the Parquet, and writes the combined result.This is safe for mode switches: if only the HF database is provided but the daily database also exists, pass both to preserve all historical data. When both databases contain a row for the same vault at the same timestamp, the HF row wins (more recent data).
Daily rows have midnight timestamps (from
pd.to_datetime(date)), HF rows have raw API timestamps — they rarely collide.- Parameters
parquet_path (pathlib.Path) – Path to the uncleaned Parquet file.
daily_db (Optional[eth_defi.hyperliquid.daily_metrics.HyperliquidDailyMetricsDatabase]) – Daily metrics database (optional).
hf_db (Optional[eth_defi.hyperliquid.high_freq_metrics.HyperliquidHighFreqMetricsDatabase]) – High-frequency metrics database (optional).
- Returns
The combined DataFrame (EVM + Hypercore rows).
- Return type