How to get Bitcoin historical data from Bitcoin-Core?

2

1

I installed Bitcoin-Core Wallet and downloaded the whole 130gigs BlockChain. Now I'd like to read the BlockChain Data to know all bitcoin values since the beginning. Not sure how to start. I need that data for making my own graphs in Excel

How can I read data from the whole BlockChain? Thanks.

Fred Cailloux

Posted 2017-04-15T21:45:50.923

Reputation: 123

4What do you mean by bitcoin values?Pieter Wuille 2017-04-15T22:57:43.693

Answers

3

It sounds like you are asking how to build a block explorer. Basically you would activate the full transaction index by adding txindex=1 to your bitcoin.conf. Parse all the history data and dump it into a database. Then keep track of all the new transaction data on your own database as blocks come in with blocknotify or real-time with ZMQ notifications.

https://github.com/bitcoin/bitcoin/blob/master/doc/zmq.md#usage

There's also options like bitpay's bitcore that pretty much does the work for you. It does require a lot more HD space though.

m1xolyd1an

Posted 2017-04-15T21:45:50.923

Reputation: 3 356

1

My understanding of your question is that you want a tool that parses/queries the blockchain and saves the results into an Excel file. I'm not sure that something like that exists, but if you're willing to experiment with code then there are options.

  • Abe is a block browser for Bitcoin & similar currencies. Written in Python.
  • BitcoinJS is a javaScript library for the Bitcoin blockchain.
  • fast-dat-parser a blockchain parser written in C++.

Each of these libraries is capable of reading the blockchain, and the languages have other libraries for saving data to Excel, CSV, in a database, etc.

Lenwood

Posted 2017-04-15T21:45:50.923

Reputation: 145

-1

Checkout this API: https://blockchain.info/api

Specifically look at "Transactions & Blocks Data" & "Market Data".

With PHP you can use that API and work with the data. PHP also allows you to create and export to Excel sheets: http://www.the-art-of-web.com/php/dataexport/

For me, because I know PHP, this would be the easiest route to go.

Marc Alexander

Posted 2017-04-15T21:45:50.923

Reputation: 531

OP is asking how to read data from the blockchain that his Bitcoin Core instance downloaded, not how to use a 3rd party API.Pieter Wuille 2017-04-23T08:48:31.430

I was just telling him how I would do it as the last line of my answer says. Any bit of information helps that is relevant. Maybe if he knew PHP he would find it easier to do the route I recommended. But I do see your perspective.Marc Alexander 2017-06-09T22:43:42.980