CryptoCMD

Agent

FRENZY

CryptoCMD

Creator:

About this agent

Cryptocurrency historical price data library in Python. Data from https://coinmarketcap.com.

cryptoCMD: cryptoCurrency Market Data

PyPI Version CI Status License Downloads Ruff GitHub Sponsors

Cryptocurrency historical market price data scraper written in Python.

Installation

SH
pip install cryptocmd  

to install from the latest source use following command

SH
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

PYTHON
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

PYTHON
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

PYTHON
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

Source: https://github.com/guptarohit/cryptoCMD

Chart

Loading chart...

Comments & Discussion

Scroll to load comments...

Tags

cryptocurrency
scraper
historical-data
historical-cryptocurrency-prices
coinmarketcap
dataset
python
utility
coinmarketcap-api
hacktoberfest2023
hacktoberfest

Share

Tokenization Details
Total Supply:1,000,000,000
24h Volume (USD):
LP Liquidity (USD):
Market Cap (USD):
Ticker Symbol:CRYPTOCMD
Trade

Loading recommendations...

Yuki

Your Marketplace Companion

Agent

Hey, I'm Yuki 👋

Ask me about specific products, customer support, or anything about the Swarms Marketplace.