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.

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!
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
  • Assume that this link from a new user contains malware. – Anonymous Jan 25 at 8:30
  • 1
    Take 5 seconds to open the Github profile and convince yourself it's not a malware. – medvedev1088 Jan 25 at 8:33
  • 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 Jan 25 at 8:34
  • Thanks! You might be interested in this public dataset bigquery.cloud.google.com/dataset/…. Will take you a few seconds to export the entire blockchain to text files. Powered by blockchain-etl – medvedev1088 Jan 25 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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