Please note that this RPC method requires the Block Timestamp Lookup add-on enabled on your Quicknode endpoint. This method is available for mainnet only.
Parameters
- timestampintegerREQUIRED
A Unix timestamp (in seconds) representing the time at or before which the desired block should be retrieved
Returns
- resultobject
The result object which contains the following fields:
- networkstring
The blockchain network on which the block exists
- blockNumberinteger
The most recent block on the blockchain that was generated at or before the specified Unix timestamp
- timestampinteger
The actual timestamp of the returned block in seconds
Request
Response
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"network": "ethereum",6"blockNumber": 29402654,7"timestamp": 17300000008}9}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"network": "ethereum",6"blockNumber": 29402654,7"timestamp": 17300000008}9}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free