I want to find out how many addresses have had x transactions over time.

I want to find out the average bitcoin transaction size for over time...I want to do a bunch of different queries like that on a regular basis.

Big picture: I want to do fundamental research on block chain activity and publish it. I have worked a decent bit with databases in the past. How can I learn to interact proficiently with the bitcoin blockchain?

  • Possible duplicate of bitcoin.stackexchange.com/questions/19371/… Oct 24, 2017 at 18:34
  • I assume you mean for Bitcoin? Otherwise, you can google blockchains explorer for almost all coins and you can query tx id and public addresses.
    – user65146
    Nov 25, 2017 at 6:57

3 Answers 3


One could extract the Blockchain and import it to your own database for analysis. For example, see project: bitcoin-to-neo4j.


My recommendation would be to use BlockSci, an in-memory blockchain database with a Python interface that allows to do this kind of queries in a very efficient way.

For instance, you can build this plot with the average transaction size: enter image description here

with just a few lines of code:

import blocksci
import numpy as np
chain = blocksci.Blockchain(DATA_DIR)
tx_size = [(block.height, np.mean(block.txes.size_bytes)) for block in chain]
df_tx_size = pd.DataFrame(tx_size, columns=["Height", "Avg. tx size"])
df = chain.heights_to_dates(df_tx_size)
del df["Height"]
ax = df.resample("M").mean().plot()

Your best bet without downloading the entire blockchain is use stats from here: https://blockchain.info/stats

But if you want to query the bitcoin blockchain locally, you'll need to download the 120+GB blockchain and then write up a custom script to consume the data manually to do what you need. Time intensive if you are willing to invest in it. Otherwise best to use publicly available stats and data and work off of that.

Your Answer

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

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