Skip to main content

kaia_getBlockTransactionCountByHash

POST

Returns the number of transactions in a block by block hash.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
param[0]
blockHashstringrequired
Block hash is a unique identifier for a block. Block hash is expressed as a 64-digit hexadecimal string.
param[1]
includeTransactionsbooleanrequired
Whether to include transactions. Set to true to return results with transactions.
Responses
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://kaia-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "kaia_getBlockTransactionCountByHash",
"params": [
"0x59f63e3840e0f4a1659074c1a4021e881a268a52d31958688da1d66bfbf6d2ca",
false
]
}'