Python API wrapper and scraper for coinmarketcappy data
Project description
Installation
To install coinmarketcappy, simply use pip:
$ pip install coinmarketcappy
Usage
Every method supports the arguments ‘out_file’ and ‘wformat’ to save the information to a file. If ‘outfile’ is present then the info will be saved to that file. Use absolute path unless you want to save locally. If ‘wformat’ is not specified, it will default to ‘json’ (‘csv’ also supported for historical_snapshots)
To get Historical Snapshots (taken every Sunday since 20130428) or Global Charts data:
import coinmarketcappy as cmc
# Get all available historical snapshots to choose from
dates = cmc.available_snaps()
# Retrieve info for the last 10 snapshots
snaps = cmc.historical_snapshots(dates[-10:])
# Percentage of Market Capitalization (Dominance)
dom = cmc.dominance()
# Total Market Capitalization
cap = cmc.total_market_cap()
# Total Market Capitalization (Excluding Bitcoin)
cap = cmc.total_market_cap(exclude_btc=True)
Contributing
Please read the CONTRIBUTING document before making changes that you would like adopted in the code.
Code of Conduct
Everyone interacting in the coinmarketcappy project’s codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.