Blocks
Get Block Number by Timestamp
Returns the block number that was mined at a certain timestamp.
https://gatescan.org/api
?module=block
&action=getblocknobytime
×tamp=1629874109
&closest=before
&apikey=YourApiKeyToken
Try this endpoint in your broswer
- Request
- Response
| Parameter | Description |
|---|---|
| closest | the closest available block to the provided timestamp, either before or after |
| timestamp | the integer representing the Unix timestamp in seconds |
{
"status":"1",
"message":"success",
"data":177931
}
Tip: Convert a regular date-time to a Unix Unixtimestamp
Get Daily Average Block Size
Returns the daily average block size within a date range.
https://gatescan.org/api
?module=stats
&action=dailyavgblocksize
&startdate=2022-01-01
&enddate=2022-01-02
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your broswer
- Request
- Response
| Parameter | Description |
|---|---|
| startdate | the starting date in yyyy-MM-dd format, eg. 2022-01-01 |
| enddate | the enddate date in yyyy-MM-dd format, eg. 2022-01-01 |
| sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
{
status: 1,
message: 'success',
data: [
{ size: 1518, date: '2022-01-01' },
{ size: 1518, date: '2022-01-02' }
]
}
Get Daily Block Count and Rewards
Returns the number of blocks mined daily and the amount of block rewards.
https://gatescan.org/api
?module=stats
&action=dailyblkcount
&startdate=2022-01-01
&enddate=2022-01-02
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your broswer
- Request
- Response
| Parameter | Description |
|---|---|
| startdate | the starting date in yyyy-MM-dd format, eg. 2022-01-01 |
| enddate | the enddate date in yyyy-MM-dd format, eg. 2022-01-01 |
| sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
{
status: 1,
message: 'success',
data: [
{ count: 2876, reward: 1150.4, date: '2022-01-01' },
{ count: 2876, reward: 1150.4, date: '2022-01-02' }
]
}
Get Daily Block Rewards
Returns the number of blocks mined daily and the amount of block rewards.
https://gatescan.org/api
?module=stats
&action=dailyblkcount
&startdate=2022-01-01
&enddate=2022-01-02
&sort=asc
&apikey=YourApiKeyToken
Try this endpoint in your broswer
- Request
- Response
| Parameter | Description |
|---|---|
| startdate | the starting date in yyyy-MM-dd format, eg. 2022-01-01 |
| enddate | the enddate date in yyyy-MM-dd format, eg. 2022-01-01 |
| sort | the sorting preference, use asc to sort by ascending and desc to sort by descending |
{
status: 1,
message: 'success',
data: [
{ count: 2876, reward: 1150.4, date: '2022-01-01' },
{ count: 2876, reward: 1150.4, date: '2022-01-02' }
]
}