Using Blockchain.info's API, my current approach is to query the endpoint for a block then to collect all the transaction hashes within that block:


Then I query the endpoint with each transaction hash to get the details of the transaction:


so I can compute the fees: the difference between the input values and the output values.

The problem is that a block can contain upwards of 2.5k transactions, easily taking me over the call limit for the API. Perhaps there is a more economical way to get all the transaction details in a particular block?

The reason why I want to calculate the fees myself is because most APIs don't take into account Segwit transactions. See this conversation:


  • 1
    I'd really recommend using a local bitcoind full node if you're trying to process this much data. It's more secure (since your full node won't lie to you) and scalable (since you're not sending thousands of API requests to a remote third party).
    – jnewbery
    Nov 7, 2017 at 15:35


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.