Cryptocurrency historical market price data scraper written in Python.
$ pip install cryptocmd
to install from the latest source use following command
$ pip install git+git://github.com/guptarohit/cryptoCMD.git
Following methods are available to get data in multiple formats from https://coinmarketcap.com
from cryptocmd import CmcScraper
# initialise scraper without passing time interval
scraper = CmcScraper('XRP')
# data as list of list in a variable
headers, data = scraper.get_data()
# export the data as csv file, you can also pass optional name parameter
scraper.export_csv('xrp_all_time.csv')
# Pandas dataFrame for the same data
df = scraper.get_dataframe()
from cryptocmd import CmcScraper
# initialise scraper
scraper = CmcScraper('XRP', '15-10-2017', '25-10-2017')
# get data as list of list
headers, data = scraper.get_data()
# export the data to csv
scraper.export_csv()
# get dataframe for the data
df = scraper.get_dataframe()
Date, Open, High, Low, Close, Volume, Market Cap
To build the image, run
docker build -t crypto-cmd .`
Run like this
docker run --rm -it crypto-cmd python samples/market-historical.py
or also mount the current working directory to output the csv files into the current working directory
docker run -v `pwd`:/usr/src --rm -it crypto-cmd python samples/market-historical.py
The data is being scrapped from coinmarketcap ✌️ and it's free to use. 🎉
Feel free to make a pull request!