🟪 Polygon

Polygon API Documentation

eth_getBlockTransactionCountByNumber RPC method

eth_getBlockTransactionCountByNumber returns the number of transactions in a block matching the given block number.


To use eth_getBlockTransactionCountByHash method you need to be connected to an Ethereum node either a remote one through services like CHAINNODES (opens in a new tab) or a local one.


Block trasaction count- integer of the number of transactions in this block.


blockNumber or Tag - Block number as hexadecimal or the string "latest", "earliest", "pending", "safe" or "finalized". "Safe" and "finalized" are only availible on Ethereum and Arbitrum One chains. Read block parameter description (opens in a new tab).


POST https://<network>.chainnodes.org/YOUR-API-KEY


  • HTTPS POST Request with a JSON RPC call in the body
  • Replace YOUR-API-KEY with the API key from your CHAINNODES.ORG Dashboard
  • You can use a different supported network by replacing polygon-mainnet
curl https://polygon-mainnet.chainnodes.org/YOUR-API-KEY \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0x1029C88"],"id":1}'

💡 Confusing?

Ask our experienced blockchain developers in Telegram


  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x8c"

JSON-RPC API Polygon Documentation by CHAINNODES is based on Erigon node client. Contact us if you are interested in specific methods that are only available on geth, besu, Nethermind or reth