I am currently thinking of doing a research project on Bitcoins. I want to download the list of all transactions of bitcoins. I was wondering what are the ways to do this? I believe I can scrape, but is there a better and faster way to do this?
5 Answers
If you're looking for all BTC balances, this github repository looks useful. It would likely crash due to memory issues, but could show you all transactions using the "transactions" argument. https://github.com/znort987/blockparser
There is a new tool by a Princeton research group that does exactly this: https://github.com/citp/BlockSci
The list of all transactions is the blockchain. The fastest way to get the blockchain is to run a full node which will download the blockchain for you and provide ways for you to access the data stored within the blockchain.
You can use Bitcoin Core and enable the transaction index so that you can get all transaction information. The transaction index is enabled by adding txindex=1
to your bitcoin.conf file.
-
How do you recommend I run a full node? I am sorry, I am completely new to blockchain/bitcoin etc. I do know Python well though so any guidance would be appreciated– bawaFeb 23, 2018 at 10:56
-
Downloaded bitcoin core. Downloading all the transactions. Could you actually guide me, how I could import all of it (once its downloaded) into a sort of a csv file or maybe in a data frame in python?– bawaFeb 23, 2018 at 11:09
-
1You can use the JSON-RPC interface to connect to Bitcoin Core and send commands that fetch the blockchain data for you. Then you can put that into whatever format you want and handle it however you want. This library may be helpful to you: github.com/jgarzik/python-bitcoinrpc– Andrew Chow ♦Feb 23, 2018 at 15:57
If you already download (sync) the full blockchain database with Bitcoin Core, the fastest way to get the full list of all transactions is to use blockchain parser.
This script parses raw blockchain database which is stored in blk******.dat files and can extract all the data. If you need just TX hashes, you can leave only them as output information and just comment all the fields that you don't need to be in the output text files.
This is the most easiest way to do what you need.
Download the bitcoin core bootstrap.dat
Most downloads are compressed to save on download time.
Update: Here's the torrents. https://getbitcoinblockchain.com/
-
The
bootstrap.dat
download method was deprecated around the release of Bitcoin Core 0.10 in february 2015. Mar 24, 2018 at 20:50