Quaiscan
  • Quaiscan Open-Source Explorer
  • 🙎Using Quaiscan
    • Getting Started
      • Glossary of Terms
      • Main Menu
      • Blocks
      • Transaction Types
    • Token Support
      • ERC-1155 Support
  • 👩‍💻Developer Support
    • Quaiscan API
      • REST API Endpoints
      • GraphQL
      • JSON RPC & Quai Compatible RPC Endpoints
        • Account
        • Block
        • Contract
        • Logs
        • Stats
        • Token
        • Transaction
        • Quai RPC API
    • Smart Contract Verification
      • Quaiscan UI
      • Quaiscan smart-contract verification API
      • Hardhat Verification Plugin
    • Local Deployment
  • FAQs
    • User FAQs
    • Developer FAQs
  • 🧩Resources
    • Media kit
    • Release Notes
      • v1.0.0
    • Discussion
    • GitHub Repo
Powered by GitBook
On this page
  • https://quaiscan.io/api?module=block
  • Get block reward by block number
  • Get estimated block countdown time by block number
  • Get block number by time stamp
  • Get the latest block number
Export as PDF
  1. Developer Support
  2. Quaiscan API
  3. JSON RPC & Quai Compatible RPC Endpoints

Block

?module=block

https://quaiscan.io/api?module=block

Get block reward by block number

getblockreward

Returns the block reward and 'uncle' block rewards when applicable.

Example:

https://quaiscan.io/api
   ?module=block
   &action=getblockreward
   &blockno={blockNumber}
Parameter
Description

blockno

integer block number to check block rewards for eg. 2165403

{
	"message": "OK",
	"result": {
		"blockMiner": "0x00a3e45aa16163f2663015b6695894d918866d19",
		"blockNumber": "2165403",
		"blockReward": "5314181600000000000",
		"timeStamp": "1472533979",
		"uncleInclusionReward": null,
		"uncles": null
	},
	"status": "1"
}

Get estimated block countdown time by block number

getblockcountdown

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

Example:

https://quaiscan.io/api
   ?module=block
   &action=getblockcountdown
   &blockno={blockNumber}
Parameter
Description

blockno

integer block number to check block rewards for eg. 2165403

{
	"message": "OK",
	"result": {
		"CurrentBlock": "115334213",
		"CountdownBlock": "116015880",
		"RemainingBlock": "681667",
		"EstimateTimeInSec": "1363349.0"
	},
	"status": "1"
}

Get block number by time stamp

getblocknobytime

Returns the block number created closest to a provided timestamp.

Example:

https://quaiscan.io/api
   ?module=block
   &action=getblocknobytime
   &timestamp={blockTimestamp}
   &closest={before/after}
Parameter
Description

timestamp

integer representing the Unix timestamp in seconds.

closest

closest block to the provided timestamp, either before or after.

{
  "message": "OK",
  "result": {
    "blockNumber": "2165403"
  },
  "status": "1"
}

Get the latest block number

quai_block_number

Mimics Quai Network JSON RPC's quai_blockNumber.

Example:

https://quaiscan.io/api
   ?module=block
   &action=quai_block_number
Parameter
Description

id

optional nonnegative integer that represents the json rpc request id.

{
  "jsonrpc": "2.0",
  "result": "0x103538a",
  "id": 1
}
PreviousAccountNextContract

Last updated 7 months ago

Note: .

More on .

👩‍💻
How to convert date/time to a Unix timestamp
json rpc request id