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

eth_getBlockTransactionCountByNumber

Introduction

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

Parameter Description

Parameter

Type

Description

Block number

String

A hexadecimal block number, or the string (earliest, latest, or pending).

Return Value

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

Request

curl https://polygon-mainnet.shared-fullnode.bcs.ap-southeast-3.myhuaweicloud.com/v1/<API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"method":"eth_getBlockTransactionCountByNumber","params":["0xc5043f"],"id":1,"jsonrpc":"2.0"}'