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, checkpoint_freq=1250000000)

Quickly get block timestamps using Hypersync API and a local cache file.

  • Ultra fast, used optimised Hypersync streaming and DuckDB local cache.

Returns

Block number -> datetime mapping

Parameters
  • client (hypersync.HypersyncClient) –

  • chain_id (int) –

  • start_block (int) –

  • end_block (int) –

  • display_progress (bool) –

  • checkpoint_freq (int) –

Return type

eth_defi.event_reader.timestamp_cache.BlockTimestampSlicer