.csv file of every block timestamp in btc history

1

i am looking for a .csv file of every block timestamp in bitcoin history with the block height. i can get one day at a time from bitcoin.info but i dont fancy manually copying and pasting over 3000 days worth and cleaning that data up. Does anyone know an efficient way to obtain this? i'll even settle for the daily block count, as long as its back to the genesis block and in .csv format.

joaf bresj

Posted 2018-03-29T20:41:33.960

Reputation: 11

Answers

1

You can use https://blockchair.com/bitcoin/blocks. It is limited to 1 million cells for free, but as you only need "Time" and "Height", just:

  1. deselect all checkboxes but "Height", and click on "Export" selecting then "csv". Open this file with your spreadsheet app.
  2. deselect "Height" and select only "Time". Export.
  3. Open the file from (2), copy the column, and paste it next to the first column in file from (1).
  4. as the results are both ordered by time, rows coincide and you already have the desired data!

circulosmeos

Posted 2018-03-29T20:41:33.960

Reputation: 526

0

You can export them from the node using this tool https://github.com/blockchain-etl/bitcoin-etl

> pip install bitcoin-etl
> bitcoinetl export_blocks_and_transactions --start-block 0 --end-block 500000 \
 --provider-uri http://user:pass@localhost:8332 \
 --blocks-output blocks.csv

medvedev1088

Posted 2018-03-29T20:41:33.960

Reputation: 101

Assume that this link from a new user contains malware.Anonymous 2019-01-25T08:30:15.383

1Take 5 seconds to open the Github profile and convince yourself it's not a malware.medvedev1088 2019-01-25T08:33:13.163

1

Better than assuming it is benign. You might be interested in bitcoin-iterate that's likely many orders of magnitude faster, especially when all of the block files end up in memory.

Anonymous 2019-01-25T08:34:53.517

Thanks! You might be interested in this public dataset https://bigquery.cloud.google.com/dataset/bigquery-public-data:crypto_bitcoin. Will take you a few seconds to export the entire blockchain to text files. Powered by blockchain-etl

medvedev1088 2019-01-25T08:40:38.077