Blocks
Last updated
Last updated
Returns the block reward and 'Uncle' block rewards.
https://api-optimistic.etherscan.io/api
?module=block
&action=getblockreward
&blockno=2165403
&apikey=YourApiKeyToken
Try this endpoint in your browser
Query Parameters
Parameter | Description |
---|---|
Sample Response
{
"status":"1",
"message":"OK",
"result":{
"blockNumber":"2165403",
"timeStamp":"1472533979",
"blockMiner":"0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3",
"blockReward":"5314181600000000000",
"uncles":[
{
"miner":"0xbcdfc35b86bedf72f0cda046a3c16829a2ef41d1",
"unclePosition":"0",
"blockreward":"3750000000000000000"
},
{
"miner":"0x0d0c9855c722ff0c78f21e43aa275a5b8ea60dce",
"unclePosition":"1",
"blockreward":"3750000000000000000"
}
],
"uncleInclusionReward":"312500000000000000"
}
}
Returns the estimated time remaining, in seconds, until a certain block is mined.
https://api-optimistic.etherscan.io/api
?module=block
&action=getblockcountdown
&blockno=16701588
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status":"1",
"message":"OK",
"result":{
"CurrentBlock":"12715477",
"CountdownBlock":"16701588",
"RemainingBlock":"3986111",
"EstimateTimeInSec":"52616680.2"
}
}
Returns the block number that was mined at a certain timestamp.
https://api-optimistic.etherscan.io/api
?module=block
&action=getblocknobytime
×tamp=1578638524
&closest=before
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status":"1",
"message":"OK",
"result":"12712551"
}
Returns the daily average block size within a date range.
https://api-optimistic.etherscan.io/api
?module=stats
&action=dailyavgblocksize
&startdate=2022-02-01
&enddate=2022-08-04
&sort=asc
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"UTCDate": "2022-02-01",
"unixTimeStamp": "1643673600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-02",
"unixTimeStamp": "1643760000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-03",
"unixTimeStamp": "1643846400",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-04",
"unixTimeStamp": "1643932800",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-05",
"unixTimeStamp": "1644019200",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-06",
"unixTimeStamp": "1644105600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-07",
"unixTimeStamp": "1644192000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-08",
"unixTimeStamp": "1644278400",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-09",
"unixTimeStamp": "1644364800",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-10",
"unixTimeStamp": "1644451200",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-11",
"unixTimeStamp": "1644537600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-12",
"unixTimeStamp": "1644624000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-13",
"unixTimeStamp": "1644710400",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-14",
"unixTimeStamp": "1644796800",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-15",
"unixTimeStamp": "1644883200",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-16",
"unixTimeStamp": "1644969600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-17",
"unixTimeStamp": "1645056000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-18",
"unixTimeStamp": "1645142400",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-19",
"unixTimeStamp": "1645228800",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-20",
"unixTimeStamp": "1645315200",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-21",
"unixTimeStamp": "1645401600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-22",
"unixTimeStamp": "1645488000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-23",
"unixTimeStamp": "1645574400",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-24",
"unixTimeStamp": "1645660800",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-25",
"unixTimeStamp": "1645747200",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-26",
"unixTimeStamp": "1645833600",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-27",
"unixTimeStamp": "1645920000",
"blockSize_bytes": 0
},
{
"UTCDate": "2022-02-28",
"unixTimeStamp": "1646006400",
"blockSize_bytes": 0
}
]
}
Returns the number of blocks validated daily and the amount of block rewards.
https://api-optimistic.etherscan.io/api
?module=stats
&action=dailyblkcount
&startdate=2022-02-01
&enddate=2022-02-28
&sort=asc
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"UTCDate": "2022-02-01",
"unixTimeStamp": "1643673600",
"blockCount": 34449,
"blockRewards_Eth": "0.112313071099525485"
},
{
"UTCDate": "2022-02-02",
"unixTimeStamp": "1643760000",
"blockCount": 43833,
"blockRewards_Eth": "0.14485981784310733"
},
{
"UTCDate": "2022-02-03",
"unixTimeStamp": "1643846400",
"blockCount": 37329,
"blockRewards_Eth": "0.122213399047948731"
},
{
"UTCDate": "2022-02-04",
"unixTimeStamp": "1643932800",
"blockCount": 35839,
"blockRewards_Eth": "0.124500452093796503"
},
{
"UTCDate": "2022-02-05",
"unixTimeStamp": "1644019200",
"blockCount": 33860,
"blockRewards_Eth": "0.12721980594650108"
},
{
"UTCDate": "2022-02-06",
"unixTimeStamp": "1644105600",
"blockCount": 27472,
"blockRewards_Eth": "0.084729422722849046"
},
{
"UTCDate": "2022-02-07",
"unixTimeStamp": "1644192000",
"blockCount": 34432,
"blockRewards_Eth": "0.116334358177524818"
},
{
"UTCDate": "2022-02-08",
"unixTimeStamp": "1644278400",
"blockCount": 40130,
"blockRewards_Eth": "0.141397174463682117"
},
{
"UTCDate": "2022-02-09",
"unixTimeStamp": "1644364800",
"blockCount": 30955,
"blockRewards_Eth": "0.103881199669693693"
},
{
"UTCDate": "2022-02-10",
"unixTimeStamp": "1644451200",
"blockCount": 38085,
"blockRewards_Eth": "0.149901960538465736"
},
{
"UTCDate": "2022-02-11",
"unixTimeStamp": "1644537600",
"blockCount": 40021,
"blockRewards_Eth": "0.133392898763221031"
},
{
"UTCDate": "2022-02-12",
"unixTimeStamp": "1644624000",
"blockCount": 34119,
"blockRewards_Eth": "0.201176949480971036"
},
{
"UTCDate": "2022-02-13",
"unixTimeStamp": "1644710400",
"blockCount": 27116,
"blockRewards_Eth": "0.098262573743014655"
},
{
"UTCDate": "2022-02-14",
"unixTimeStamp": "1644796800",
"blockCount": 32398,
"blockRewards_Eth": "0.25391900051223194"
},
{
"UTCDate": "2022-02-15",
"unixTimeStamp": "1644883200",
"blockCount": 32376,
"blockRewards_Eth": "0.065119340149239753"
},
{
"UTCDate": "2022-02-16",
"unixTimeStamp": "1644969600",
"blockCount": 31526,
"blockRewards_Eth": "0.069572223350684361"
},
{
"UTCDate": "2022-02-17",
"unixTimeStamp": "1645056000",
"blockCount": 30387,
"blockRewards_Eth": "0.093273257731924376"
},
{
"UTCDate": "2022-02-18",
"unixTimeStamp": "1645142400",
"blockCount": 20999,
"blockRewards_Eth": "0.108837824859879412"
},
{
"UTCDate": "2022-02-19",
"unixTimeStamp": "1645228800",
"blockCount": 16452,
"blockRewards_Eth": "0.082019908915710786"
},
{
"UTCDate": "2022-02-20",
"unixTimeStamp": "1645315200",
"blockCount": 22340,
"blockRewards_Eth": "0.105237458052274284"
},
{
"UTCDate": "2022-02-21",
"unixTimeStamp": "1645401600",
"blockCount": 30640,
"blockRewards_Eth": "0.120817339768801249"
},
{
"UTCDate": "2022-02-22",
"unixTimeStamp": "1645488000",
"blockCount": 29410,
"blockRewards_Eth": "0.084205448248319998"
},
{
"UTCDate": "2022-02-23",
"unixTimeStamp": "1645574400",
"blockCount": 29383,
"blockRewards_Eth": "0.103805304708082822"
},
{
"UTCDate": "2022-02-24",
"unixTimeStamp": "1645660800",
"blockCount": 61397,
"blockRewards_Eth": "0.273589691871867494"
},
{
"UTCDate": "2022-02-25",
"unixTimeStamp": "1645747200",
"blockCount": 40934,
"blockRewards_Eth": "0.089256020633430275"
},
{
"UTCDate": "2022-02-26",
"unixTimeStamp": "1645833600",
"blockCount": 27644,
"blockRewards_Eth": "0.072901108713905975"
},
{
"UTCDate": "2022-02-27",
"unixTimeStamp": "1645920000",
"blockCount": 32725,
"blockRewards_Eth": "0.071928432978433499"
},
{
"UTCDate": "2022-02-28",
"unixTimeStamp": "1646006400",
"blockCount": 41658,
"blockRewards_Eth": "0.075884683494219752"
}
]
}
Returns the amount of block rewards distributed to validators daily.
https://api-optimistic.etherscan.io/api
?module=stats
&action=dailyblockrewards
&startdate=2022-08-01
&enddate=2022-08-04
&sort=asc
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status":"1",
"message":"OK",
"result":[
{
"UTCDate":"2021-08-01",
"unixTimeStamp":"1627776000",
"blockRewards_Eth":"0"
},
{
"UTCDate":"2021-08-02",
"unixTimeStamp":"1627862400",
"blockRewards_Eth":"0"
},
{
"UTCDate":"2021-08-03",
"unixTimeStamp":"1627948800",
"blockRewards_Eth":"0"
}
]
}
Returns the daily average of time needed for a block to be successfully validated.
https://api-optimistic.etherscan.io/api
?module=stats
&action=dailyavgblocktime
&startdate=2022-08-01
&enddate=2022-08-04
&sort=asc
&apikey=YourApiKeyToken
Query Parameters
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"UTCDate": "2022-08-01",
"unixTimeStamp": "1659312000",
"blockTime_sec": "0.00"
},
{
"UTCDate": "2022-08-02",
"unixTimeStamp": "1659398400",
"blockTime_sec": "0.00"
},
{
"UTCDate": "2022-08-03",
"unixTimeStamp": "1659484800",
"blockTime_sec": "0.00"
},
{
"UTCDate": "2022-08-04",
"unixTimeStamp": "1659571200",
"blockTime_sec": "0.00"
}
]
}
Tip : The timestamp
field is denoted in Unix timestamp.
Try this endpoint in your browser
Parameter | Description |
---|---|
Try this endpoint in your browser
Parameter | Description |
---|---|
Tip : Convert a regular date-time to a Unix timestamp.
Try this endpoint in your browser
Parameter | Description |
---|---|
Try this endpoint in your browser
Parameter | Description |
---|---|
Try this endpoint in your browser
Parameter | Description |
---|---|
Try this endpoint in your browser
Parameter | Description |
---|---|