Author

Topic: Steps to Grab Cryptocurrency Historical Data for Free (Read 136 times)

newbie
Activity: 120
Merit: 0
Hello everyone, this is my first post. I would like to contribute to the community by showing two simple ways to obtain cryptocurrency historical data by straight download or scraping using python.

There might be a need to save cryptocurrency historical data for various purposes, whether it for predicting price movement, feeding your AI algorithm with training dataset, etc.

You might find a crypto historical data by simply googling it, but often the results are either outdated, incomplete, or requiring paid subscription. Here are some easiest way to download updated crypto dataset for free :

I. Straight download :
   1. open coingecko.com
   2. choose the coin of your interest
   3. click "Historical Data" tab
   4. click "Export As" tab near the bottom of page, choose the desired format (xls or csv)

Downloaded historical data will have maximum historical date and contains following columns : "snapped_at","price","market_cap","total_volume"

II. Scraping the data from Coinmarketcap web page using python :
    If you want more comprehensive historical data and customizable date range, you can use python with cryptocmd library created by mr Rohit Gupta.
    The scraping method is explained very well in this link : https://github.com/guptarohit/cryptoCMD ). The process is simple to follow.  

Output of the scraping will be in csv format. You can adjust historical date to your need and historical data will contain following columns :
"Date", "Open", "High", "Low", "Close", "Volume", "Market Cap"

If anyone could find a better way to get crypto historical dataset please don't hesitate to share in the comment below, i hope this post will be helpful in the future. Thanks.
Jump to: