Register and show off your project at Ethereum QuickPitch and win $10,000. Apply now


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 - Hash of the block.


  1. Result - Integer number of transactions in the block.

Code Examples:

require 'ethereum.rb'
client ='')
txCount = client.eth_get_block_transaction_count_by_hash('0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b')
puts txCount["result"].to_i(16)
Ready to get started? Create a free account