fetch_block_timestamps_using_hypersync_cached_async
Documentation for eth_defi.hypersync.hypersync_timestamp.fetch_block_timestamps_using_hypersync_cached_async function.
- async fetch_block_timestamps_using_hypersync_cached_async(client, chain_id, start_block, end_block, cache_path=PosixPath('/home/runner/.tradingstrategy/block-timestamp'), display_progress=True, chunk_size=100000)
Quickly get block timestamps using Hypersync API and a local cache file.
Ultra fast, used optimised Hypersync streaming and DuckDB local cache.
Large ranges are split into chunks of chunk_size blocks so that each chunk opens a separate Hypersync
stream()call. This keeps individual requests small, lets the Python-side rate limiter pace them, and — crucially — saves progress after each chunk so that a 429 failure only loses the current chunk, not all prior work.
- Parameters
- Returns
Block number -> datetime mapping
- Return type