Blocks
Etherscan-compatible endpoints for the Blocks module.
Get Estimated Block Countdown Time by BlockNo
Returns the estimated time remaining, in seconds, until a certain block is mined.
GET
https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblockcountdown&blockno=99999999&apikey=YourApiKeyToken1curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblockcountdown&blockno=99999999' \
2 -H 'apikey: YourApiKeyToken'
1{
2 status: string;
3 message: string;
4 result: string;
5}
Get Block Number by Timestamp
Returns the block number that was mined at a certain timestamp.
GET
https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblocknobytime×tamp=1619638524&closest=before&apikey=YourApiKeyToken1curl 'https://api.routescan.io/v2/network/mainnet/evm/1/etherscan/api?module=block&action=getblocknobytime×tamp=1619638524&closest=before' \
2 -H 'apikey: YourApiKeyToken'