provider.quicknode

Documentation for eth_defi.provider.quicknode Python module.

Quicknode proprietary RPC calls.

Functions

estimate_block_number_for_timestamp_by_quicknode(...)

Estimate block number for a given timestamp.

Classes

QuickNodeEstimatedBlock

Estimated block number and timestamp.

class QuickNodeEstimatedBlock

Bases: object

Estimated block number and timestamp.

__init__(network, block_number, timestamp)
Parameters
  • network (str) –

  • block_number (int) –

  • timestamp (int) –

Return type

None

estimate_block_number_for_timestamp_by_quicknode(web3, timestamp)

Estimate block number for a given timestamp.

  • Use QuickNode API

  • Use proprietary qn_getBlockFromTimestamp method

Parameters
  • web3 (web3.main.Web3) – Web3 connection. Must use QuickNode as a provider.

  • timestamp (datetime.datetime) – Timestamp to estimate the block number for

Returns

Estimated block number

Return type

eth_defi.provider.quicknode.QuickNodeEstimatedBlock