Blocks

Get Block And Uncle Rewards by BlockNo

Returns the block reward and 'Uncle' block rewards.
1
https://api-kovan.etherscan.io/api
2
?module=block
3
&action=getblockreward
4
&blockno=27789908
5
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
blockno
the integer block number to check block rewards for eg. 12697906​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":{
5
"blockNumber":"27789908",
6
"timeStamp":"1634553444",
7
"blockMiner":"0x03801efb0efe2a25ede5dd3a003ae880c0292e4d",
8
"blockReward":"5002845656999049127",
9
"uncles":[
10
11
],
12
"uncleInclusionReward":"0"
13
}
14
}
Copied!
​​
⏳
Tip : The timestamp field is denoted in Unix timestamp.​

Get Estimated Block Countdown Time by BlockNo

Returns the estimated time remaining, in seconds, until a certain block is mined.
1
https://api-kovan.etherscan.io/api
2
?module=block
3
&action=getblockcountdown
4
&blockno=28789908
5
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
blockno
the integer block number to estimate time remaining to be mined eg. 12697906​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":{
5
"CurrentBlock":"27789938",
6
"CountdownBlock":"28789908",
7
"RemainingBlock":"999970",
8
"EstimateTimeInSec":"3999895.0"
9
}
10
}
Copied!

Get Block Number by Timestamp

Returns the block number that was mined at a certain timestamp.
1
https://api-kovan.etherscan.io/api
2
?module=block
3
&action=getblocknobytime
4
&timestamp=1578638524
5
&closest=before
6
&apikey=YourApiKeyToken
Copied!
Try this endpoint in your browser
πŸ”—
​
Request
Response
Query Parameters
Parameter
Description
timestamp
the integer representing the Unix timestamp in seconds.
closest
the closest available block to the provided timestamp, either before or after
​
⏳
Tip : Convert a regular date-time to a Unix timestamp.​
Sample Response
1
{
2
"status":"1",
3
"message":"OK",
4
"result":"16021214"
5
}
Copied!