Updated on 2023-12-15 GMT+08:00

eth_getBlockTransactionCountByHash

Introduction

This API returns the number of transactions for the block by block hash. It consumes 13 CUs. In the dedicated edition, the throughput is 25,000 per second for 8 vCPUs and 32 GB memory and 54,000 per second for 16 vCPUs and 64 GB memory.

Parameter Description

Parameter

Type

Description

Block hash

String

The hash of a block.

Return Value

The number of transactions associated with a specific block, in hexadecimal value.

Request

curl https://your-http-endpoint/v1/<API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getBlockTransactionCountByHash","params":["0x81e807e7a6031d9f103eeee2a2edc5994c3432ee1e3227c66ff78eef30ea1dec"],"id":1,"jsonrpc":"2.0"}'