Skip to main content

Blocks

Get block reward by block number

This API endpoint allows you to retrieve the reward for a specific block on the blockchain by providing the block number.

Free [2 Credits]

Endpoint

GET

https://mainnet-oapi.kaiascan.io/api?module=block&action=getblockreward&blockno={blockNumber}&apikey={YourApiKey}

Request Parameters

ParameterTypeRequiredDescription
blocknoIntegerYesThe block number you want to query.

Sample Response

{
"status": "1",
"message": "OK",
"result": {
"blockMiner": "0x56e3a565e31f8fb0ba0b12c03355518c64372120",
"blockNumber": "123",
"blockReward": "9600000000000000000",
"timeStamp": "1561462973"
}
}


Get estimated block countdown time by block number

Retrieve the estimated time remaining until a specific block is mined.

Free [2 Credits]

Endpoint

GET

https://mainnet-oapi.kaiascan.io/api?module=block&action=getblockcountdown&blockno={blockNumber}&apikey={YourApiKey}

Request Parameters

ParameterTypeRequiredDescription
blocknoIntegerYesThe block number you want to query.

Sample Response

{
"status": "1",
"message": "OK",
"result": {
"CurrentBlock": "176710388",
"CountdownBlock": "175405107",
"RemainingBlock": "0",
"EstimateTimeInSec": "0"
}
}


Get Block Number by Timestamp

Retrieve the block number that was mined closest to a given timestamp.

Free [2 Credits]

Endpoint

GET

https://mainnet-oapi.kaiascan.io/api?module=block&action=getblocknobytime&timestamp={timestamp}&closest={closest}&apikey={YourApiKey}

Request Parameters

ParameterTypeRequiredDescription
timestampIntegerYesrepresenting the Unix timestamp in seconds.
closestStringYesbefore to get the block before the timestamp, after to get the block after.

Sample Response

{
"status": "1",
"message": "OK",
"result": "175406823"
}


Get the Latest Block Number

Mimics JSON RPC's eth_blockNumber.

Free [2 Credits]

Endpoint

GET

https://mainnet-oapi.kaiascan.io/api?module=proxy&action=eth_block_number&apikey={YourApiKey}

Sample Response

{
"status": "1",
"message": "OK",
"result": "0xa886769"
}