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

eth_getBlockTransactionCountByHash

Introduction

This API returns the number of transactions for the block by block hash. It consumes 20 CUs.

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"}'