POSTkaia_getBlockByNumber

Retrieves block information by block number.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Enter the following parameters as an array with the appropriate types.

  1. block number or block tag: Enter the block number to query as a hexadecimal string. You may also use block tags such as "earliest", "latest", "pending".
  2. includeTransactions : Boolean indicating whether to include all transaction information in the block when querying. true includes all transactions, false excludes them.
params[0]string

Use one of block number or block tag to specify the block.

  • Block number: Hexadecimal string (e.g. "0x1")
  • Block tag: Enum string (e.g. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
params[1]boolean

Whether to include transactions. Set to true to return results with transactions.

Responses
blockScorestring

Former difficulty field (hex)

extraDatastring

Arbitrary extra data added by the miner (hex)

gasUsedstring

Total gas used by all transactions in this block (hex)

governanceDatastring

RLP-encoded governance configuration data (hex)

hashstring

Block hash

logsBloomstring

Bloom filter for event log search (2048 bits, hex)

numberstring

Block number (hex)

parentHashstring

Hash of the parent block

proposerstring

Address of the node that proposed this block

receiptsRootstring

Root hash of the transaction receipts trie

rewardstring

Address of the reward beneficiary

sizestring

Block size in bytes (hex)

stateRootstring

Root hash of the state trie

timestampstring

Block creation time (Unix timestamp, hex)

timestampFoSstring

Fractional seconds of block creation time (1/100 second, hex)

totalBlockScorestring

Cumulative blockScore from genesis to this block (hex)

transactionsoneOf

Transactions in this block

array 1string[]
array 2object[]
transactionsRootstring

Root hash of the transactions trie

voteDatastring

RLP-encoded governance vote data (hex)

X-API-KEY
RequestCU31
cURL
curl -X POST "https://kaia-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "kaia_getBlockByNumber",
  "params": [
    "0x1076B5A",
    false
  ]
}'
Response
Example · 200
{
  "blockScore": "string",
  "extraData": "string",
  "gasUsed": "string",
  "governanceData": "string",
  "hash": "string",
  "logsBloom": "string",
  "number": "string",
  "parentHash": "string",
  "proposer": "string",
  "receiptsRoot": "string",
  "reward": "string",
  "size": "string",
  "stateRoot": "string",
  "timestamp": "string",
  "timestampFoS": "string",
  "totalBlockScore": "string",
  "transactions": [
    "string"
  ],
  "transactionsRoot": "string",
  "voteData": "string"
}