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
Returns

The combined DataFrame (EVM + Hypercore rows).

Return type

pandas.DataFrame