POSTklay_getBlockByHash

Retrieves block information by block hash.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

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

  1. block hash: Enter the block hash to query as a 64-digit hexadecimal string.
  2. include transactions : Boolean indicating whether to include all transaction information in the block when querying. true includes all transactions, false excludes them.
params[0]string

Block hash is the unique identifier of a block. The block hash is represented as a 64-character hexadecimal string.

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
RequestCU32
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": "klay_getBlockByHash",
  "params": [
    "0x59f63e3840e0f4a1659074c1a4021e881a268a52d31958688da1d66bfbf6d2ca",
    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"
}