Skip to main content

Cryptocurrency historical market price data scrapper.

Project description

https://img.shields.io/badge/Made%20with-Python-1f425f.svg https://img.shields.io/pypi/v/cryptoCMD.svg https://img.shields.io/pypi/l/cryptoCMD.svg https://img.shields.io/pypi/pyversions/cryptoCMD.svg https://img.shields.io/pypi/wheel/cryptoCMD.svg

Cryptocurrency historical market price data scraper written in Python.

Installation

$ pip install cryptocmd

to install from the latest source use following command

$ pip install -U 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 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()

To get data of a cryptocurrency for some days

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()

Following are the columns of the data

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

Contributing

Feel free to make a pull request!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cryptocmd-0.2.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Built Distribution

cryptocmd-0.2.1-py2.py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page