Returns the number of transactions in a block from a block that matches the given hash.
Supported on Klaytn (mainnet) only.
Parameters
Request
Type | Description |
---|---|
32-byte DATA | Hash of a block |
Result
Type | Description |
---|---|
QUANTITY | Integer 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"
}