klay_getBlockTransactionCountByHash

Returns the number of transactions in a block from a block that matches the given hash.

📘

Supported on Klaytn (mainnet) only.

Parameters

Request

TypeDescription
32-byte DATAHash of a block

Result

TypeDescription
QUANTITYInteger of the number of transactions in this block.

API Endpoint

The format of a Klaytn API endpoint is
https://open-platform.nodereal.io/{{apiKey}}/klaytn/

Here is an example:
https://open-platform.nodereal.io/4c0a1c23661a4e26bcbcwed461e34ea9/klaytn/

Example

// Request
curl https://open-platform.nodereal.io/{{apiKey}}/klaytn/ \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","method":"klay_getBlockTransactionCountByHash","params":["0x0c11803ab36110db993e7520908b9ba9336cca2f2dcc9b6130c481a3ccdc2621"],"id":1}' 

// Result
{
  "jsonrpc": "2.0",
  "id":1,
  "result": "0x0"
}