Skip to main content

Cryptocurrency historical market price data scrapper.

Project description

https://img.shields.io/pypi/v/cryptoCMD.svg https://travis-ci.org/guptarohit/cryptoCMD.svg?branch=master FOSSA Status https://img.shields.io/pypi/l/cryptoCMD.svg https://img.shields.io/pypi/pyversions/cryptoCMD.svg 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 :v: and it’s free to use. :tada:

Contributing

Feel free to make a pull request! :octocat:

If you found this useful, I’d appreciate your consideration in the below. ✨☕

Buy Me A Coffee Become a Patron!

License

FOSSA Status

Project details


Download files

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

Files for cryptocmd, version 0.6.0
Filename, size File type Python version Upload date Hashes
Filename, size cryptocmd-0.6.0-py3-none-any.whl (8.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cryptocmd-0.6.0.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page