0

As of April 16 2018, there have been 518563 blocks (e.g. https://blockexplorer.com/api/status?q=getBlockCount). Is anyone aware of a way to get the number of transactions in each of those 518563 blocks?

There is a page that provides the average per day of the number of transactions per block (e.g. https://blockchain.info/charts/n-transactions), but I want the raw data that went into those averages.

There is another page that provides the list of all blocks, and clicking on a block gives you the number of transactions in that block (https://blockchain.info/blocks), this is what I need, but I will have to click more than 0.5 million times.

Is anyone aware of a way to get the raw data of the number of transactions in each of all existing blocks?

2 Answers 2

0

It is not too difficult to count them. It tooks 5 minutes to create a script and 15 minutes to execute it. The result ia a text-file (tab-separated) with columns:

  • block height
  • number of transactions in block
  • total transactions from the genesis
  • block hash

first five lines:

 0  1   1   000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
 1  1   2   00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048
 2  1   3   000000006a625f06636b8bb6ac7b960a8d03705d1ace08b1a19da3fdcc99ddbd
 3  1   4   0000000082b5015589a3fdf2d4baff403e6f0be035a5d9742c1cae6295464449
 4  1   5   000000004ebadb55ee9096c9a2f8880e09da59c0d68b1c228da88e48844a1485

last five lines:

 518413  835 310436090 0000000000000000000267cf7fecca8c6ef630bc1dfb028b3c98508b7efa3a03
 518414 1408 310437498 000000000000000000462059d45abb6364d6e5dbf9681fdba3058d50974bc760
 518415 1721 310439219 0000000000000000003c993ed7386f609a52eab8d8089c6bb125879f4c757f58
 518416 2500 310441719 00000000000000000022a1a6890682a0f5be5d13b0f5ce38eb81f40f1419ee14
 518417  662 310442381 000000000000000000162d18476f00793fb1d1e9681b29545e94bcba8beb0dd3

full list archive: https://cloud.mail.ru/public/9PUk/iRJdzDzDE

2
  • Wow, that is impressive. Could the date be added? Also could you share the program and code you use. I think this will be very useful to many. Thank you very much amaclin.
    – Camilo
    Apr 17, 2018 at 6:59
  • could you share the code and how you got these data?
    – Camilo
    Apr 19, 2018 at 7:01
0

This information is viewable on statoshi.info. Specifically in the Total Historical Transactions Chart. The current transaction count (as of this writing) is 310638164 transactions.

Or you can just write a script which looks up the information for each block and calculate the total number of transactions.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.