Gnosisscan
HomeTwitterKnowledge Base
  • Introduction
  • ✨Getting Started
    • Creating an Account
    • Getting an API key
    • Endpoint URLs
  • 🎯API Endpoints
    • Accounts
    • Contracts
    • Transactions
    • Blocks
    • Logs
    • Geth Proxy
    • Tokens
    • Stats
  • 📖Tutorials
    • Signing Raw Transactions
    • Read/Write Smart Contracts
    • Verifying Contracts Programmatically
  • 🏆API PRO
    • API PRO
    • Using API PRO
  • 🤝Support
    • FAQ
    • Rate Limits
    • Common Error Messages
    • Getting Help
  • Visit Gnosisscan.io
Powered by GitBook
On this page
  • Get Block And Uncle Rewards by BlockNo
  • Get Estimated Block Countdown Time by BlockNo
  • Get Block Number by Timestamp
  1. API Endpoints

Blocks

PreviousTransactionsNextLogs

Last updated 2 years ago

Get Block And Uncle Rewards by BlockNo

Returns the block reward and 'Uncle' block rewards.

https://api.gnosisscan.io/api
   ?module=block
   &action=getblockreward
   &blockno=2165403
   &apikey=YourApiKeyToken

Try this endpoint in your

Query Parameters

Parameter
Description

blockno

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": {
    "blockNumber": "2165403",
    "timeStamp": "1550088090",
    "blockMiner": "0x9e41ba620feba8198369c26351063b26ec5b7c9e",
    "blockReward": "0",
    "uncles": [],
    "uncleInclusionReward": "0"
  }
}

​​ Tip : The timestamp field is denoted in

Get Estimated Block Countdown Time by BlockNo

Returns the estimated time remaining, in seconds, until a certain block is mined.

https://api.gnosisscan.io/api
   ?module=block
   &action=getblockcountdown
   &blockno=30000000
   &apikey=YourApiKeyToken

Query Parameters

Parameter
Description

blockno

Sample Response

{
  "status": "1",
  "message": "OK",
  "result": {
    "CurrentBlock": "24740647",
    "CountdownBlock": "30000000",
    "RemainingBlock": "5259353",
    "EstimateTimeInSec": "37341421.3"
  }
}

Get Block Number by Timestamp

Returns the block number that was mined at a certain timestamp.

https://api.gnosisscan.io/api
   ?module=block
   &action=getblocknobytime
   &timestamp=1578638524
   &closest=before
   &apikey=YourApiKeyToken

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": "7781276"
}

the integer block number to check block rewards for eg.

Try this endpoint in your

the integer block number to estimate time remaining to be mined eg.

Try this endpoint in your

Tip : Convert a regular date-time to a

🎯
🔗
⏳
browser
Unix timestamp.
🔗
browser
🔗
browser
⏳
Unix timestamp.
12697906
12697906