Skip to main content

Cryptocurrency historical market price data scrapper.

Project description

cryptoCMD: cryptoCurrency Market Data

PyPI Version CI Status License Downloads Ruff GitHub Sponsors

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 which have same coin code as others

from cryptocmd import CmcScraper

# initialise scraper with coin name as well
scraper = CmcScraper(coin_code="sol", coin_name="solana")

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

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

# export the data as csv file, you can also pass optional `name` parameter
scraper.export("csv", name="solana_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, Time Open, Time High, Time Low, Time Close

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

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.6.5.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cryptocmd-0.6.5-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file cryptocmd-0.6.5.tar.gz.

File metadata

  • Download URL: cryptocmd-0.6.5.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cryptocmd-0.6.5.tar.gz
Algorithm Hash digest
SHA256 3037d134b37dfb59e46b9edf1bad197b76827c503388b38ee4d9bcf503c25554
MD5 e773e6ea66adacd887692ec3bc587397
BLAKE2b-256 a94db8fb54cef99e9456d1009c01a1a14694e1729420de5110d252770701befb

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptocmd-0.6.5.tar.gz:

Publisher: release.yml on guptarohit/cryptoCMD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cryptocmd-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: cryptocmd-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cryptocmd-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 be813823cd6f9a0ac7ad8fc255dbe7bbb24f906b3be3cb6bfcfc7a9b7f422d05
MD5 1aa13579f818f74214ecd56cd5e7e073
BLAKE2b-256 853d58464e8f18dd5c68b274dcd6f0b8df8366bb670a7dc281b30b2d20bda4bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cryptocmd-0.6.5-py3-none-any.whl:

Publisher: release.yml on guptarohit/cryptoCMD

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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