build_raw_prices_dataframe_hf

Documentation for eth_defi.hyperliquid.vault_data_export.build_raw_prices_dataframe_hf function.

build_raw_prices_dataframe_hf(db)

Build a raw prices DataFrame from the HF DuckDB.

Exports raw API timestamps without resampling, so the spacing is irregular and reflects the vaultDetails API’s per-period resolution (~20 min for the last 24h, coarsening to ~3h / ~10.5h / ~weekly for older data — ~20 min is the finest the API ever serves). The downstream cleaning pipeline computes returns_1h via pct_change() on consecutive rows — this already works for irregular timestamps (the daily pipeline has always produced ~24h returns labelled returns_1h for Hypercore). The downstream forward_fill_vault() resamples to 1h when needed.

Parameters

db (eth_defi.hyperliquid.high_freq_metrics.HyperliquidHighFreqMetricsDatabase) – The HF metrics database.

Returns

DataFrame matching the uncleaned Parquet schema with raw timestamps.

Return type

pandas.DataFrame