Join AWS, Dust Labs & OrangeDAO at QuickPitch. Win $80k — Apply Today.


eth_getBlockTransactionCountByHash RPC Method

The API credit value for this method is 2 . To learn more about API credits and each method's value, visit the API Credits page.


  1. hash - string - The hash of the block


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

Code Examples:

const ethers = require("ethers");
(async () => {
  const provider = new ethers.providers.JsonRpcProvider("");
  const txCount = await provider.send("eth_getBlockTransactionCountByHash", [
Ready to get started? Create a free account