1

I want to fetch statistical data about the bitcoin network. Things things like wallet count, transaction count etc. Had a node running and the blockchain is on my disk. However parsing it seems to be not that trivial. I tried python-blockchain-parser however I get leveldb issues on all of my machines. I dont know the structure well and it seems like an easy thing to miss out data (segwit, lightning). Any tips?

2 Answers 2

1

If you are comfortable with SQL and are interested in running queries over the entire chain, there is a BigQuery database hosted by Google. You can find more information here: https://bitcoin.stackexchange.com/a/117171/139612

If you are more interested in the analysis of specific blocks or of transactions, bitcoin-cli provides a number of RPCs that can be used for fetching data, although this can be very slow when querying over large ranges.

In general, I'd recommend against parsing block files or leveldb files as those files are designed for efficient storage and easy use in the Bitcoin Core client and make no guarantees about being usable in other applications or providing a stable format.

1

In order to produce this graph

Bitcoin transaction data volume in recent months

I used a blockchain parser to read block files that Bitcoin core had created. The blockchain parser created CSV data that I summarised using a second program and plotted using GNUPlot

A search for "Bitcoin blockchain parser" ought to find some examples. Perhaps one of them would be of use to you.

I wrote my own (see my profile)

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.