Blocks

Get Block And Uncle Rewards by BlockNo

Returns the block reward and 'Uncle' block rewards.
1
https://api-ropsten.etherscan.io/api
2
?module=block
3
&action=getblockreward
4
&blockno=11275005
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":"11275005",
6
"timeStamp":"1634837942",
7
"blockMiner":"0xe9e7034aed5ce7f5b0d281cfe347b8a5c2c53504",
8
"blockReward":"2221181611857171000",
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-ropsten.etherscan.io/api
2
?module=block
3
&action=getblockcountdown
4
&blockno=11375005
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":"11275012",
6
"CountdownBlock":"11375005",
7
"RemainingBlock":"99993",
8
"EstimateTimeInSec":"1119936.6"
9
}
10
}
Copied!

Get Block Number by Timestamp

Returns the block number that was mined at a certain timestamp.
1
https://api-ropsten.etherscan.io/api
2
?module=block
3
&action=getblocknobytime
4
&timestamp=1634838142
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":"11275018"
5
}
Copied!
Last modified 3mo ago