Returns the block number that is closest to the provided Unix timestamp.
- Provider
- Etherscan (Ethereum Explorer)
- Input summary
- {"name":"chainid","type":"integer","required":true,"description":"The chain ID of the Ethereum network (e.g., 1 for mainnet)."}, {"name":"module","type":"string","required":true,"description":"The module name for the API action.","enum":["block"]}, {"name":"action","type":"string","required":true,"description":"The specific action to perform within the module.","enum":["getblocknobytime"]}, {"name":"timestamp","type":"integer","required":true,"description":"Unix timestamp (in seconds) to find the closest block number for."}, {"name":"closest","type":"string","required":true,"description":"Whether to return the block before or after the given timestamp.","enum":["before","after"]}
- Output summary
- Not available
- Billing
- 1
- Freshness
- Not available
- Verification
- Not available