Cryptocurrency historical price data library in Python. Data from https://coinmarketcap.com.
Branch: master
Clone or download
Latest commit 27c456b Jan 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add issue and pull request template. Feb 5, 2018
cryptocmd fix pypi issue Jan 13, 2019
examples Update example Oct 13, 2018
.gitignore fix typo Jan 28, 2018
.travis.yml Add python 3.7 Jan 12, 2019
LICENSE Initial commit Jan 27, 2018
MANIFEST.in initial commit Jan 28, 2018
Pipfile Add multiple data formats support. 🎉 Oct 13, 2018
Pipfile.lock Merge branch 'master' into multiple-formats Jan 12, 2019
README.rst Update README.rst Jan 12, 2019
setup.cfg initial commit Jan 28, 2018
setup.py Add python 3.7 Jan 12, 2019

README.rst

cryptoCMD: cryptoCurrency Market Data

https://travis-ci.org/guptarohit/cryptoCMD.svg?branch=master FOSSA Status Downloads Code style: black

Cryptocurrency historical market price data scraper written in Python.

Installation

$ pip install cryptocmd

to install from the latest source use following command

$ pip install git+git://github.com/guptarohit/cryptoCMD.git

Usage

CoinMarketCap Scraper

Following methods are available to get data in multiple formats from https://coinmarketcap.com

To get all time historical data of a cryptocurrency

from cryptocmd import CmcScraper

# initialise scraper without time interval
scraper = CmcScraper("XRP")

# get raw data as list of list
headers, data = scraper.get_data()

# get data in a json format
xrp_json_data = scraper.get_data("json")

# export the data as csv file, you can also pass optional `name` parameter
scraper.export("csv", name="xrp_all_time")

# Pandas dataFrame for the same data
df = scraper.get_dataframe()

To get data of a cryptocurrency for some days

from cryptocmd import CmcScraper

# initialise scraper with time interval
scraper = CmcScraper("XRP", "15-10-2017", "25-10-2017")

# get raw data as list of list
headers, data = scraper.get_data()

# get data in a json format
json_data = scraper.get_data("json")

# export the data to csv
scraper.export("csv")

# get dataframe for the data
df = scraper.get_dataframe()
Following are the columns of the data

Date, Open, High, Low, Close, Volume, Market Cap

Acknowledgements

The data is being scrapped from coinmarketcap ✌️ and it's free to use. 🎉

Contributing

Feel free to make a pull request! :octocat:

License

FOSSA Status