cURL
curl --request GET \ --url 'https://eth.blockscout.com/api/?module=block&action=getblocknobytime'
{ "status": "1", "message": "OK", "result": { "blockNumber": "<string>" } }
Returns the block number that was mined at a certain timestamp
Module name (must be 'block')
block
getblocknobytime
Unix timestamp
Direction to search (before or after timestamp)
before
after
Block number retrieved successfully
Status code (1 = OK)
1
Response message
"OK"
Show child attributes
Was this page helpful?