Blocks
Get Block Rewards by BlockNo
The status field returns 0 for failed transactions,1 for successful transactions and 2 for pending transactions.
https://api.btrscan.com/scan/api
?module=block
&action=getblockreward
&blockno=426364
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
{
"status": "1",
"message": "OK",
"result": {
"blockNumber": "426364",
"timeStamp": "1713555721",
"blockMiner": "0x12a95f3c32e400129c7970f5d490152ad24dd869",
"blockReward": "0.000000000000000000"
}
}
Get Block Number by Timestamp
[Parameters] timestamp format: Unix timestamp (supports Unix timestamps in seconds), closest value: 'before' or 'after'
https://api.btrscan.com/scan/api
?module=block
&action=getblocknobytime
×tamp=1715789611
&closest=before
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 |
Sample Response
{
"status": "1",
"message": "OK",
"result": "1170994",
}