Skip to main content

A Streamlit connector for the CoinMarketCap API.

Project description

CoinMarketCap Connection for Streamlit

Alt text

A Streamlit connection component to connect Streamlit apps to the CoinMarketCap API for cryptocurrency market data.

🚀 Features

  • Easy integration with Streamlit applications.
  • Access to real-time and historical cryptocurrency data including prices, market caps, and trading volumes.
  • Efficient handling of API rate limits.
  • Simple configuration using API key.

🧑‍🎓 Getting Started

Installation

Install coinmarketcap_connection via pip:

pip install coinmarketcap_connection

🔩 Configuration

Set your CoinMarketCap API key in the secrets.toml file for Streamlit apps as described in the Streamlit documentation.

🔍 Usage

Import

from coinmarketcap_connection import CoinMarketCapConnection

Initialize

cmc_connection = CoinMarketCapConnection("YOUR_CONNECTION_NAME")

Fetch Data

Use the connection to fetch the latest cryptocurrency data or historical data.

Fetch Latest Cryptocurrency Data

latest_data = cmc_connection.fetch_latest_data(limit=100)

Fetch Historical Cryptocurrency Data

historical_data = cmc_connection.fetch_historical_data(cryptocurrency_id=1, start_date='2023-01-01', end_date='2023-01-31')

📑 Documentation

For detailed documentation, visit CoinMarketCap API documentation.

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

coinmarketcap_connection-0.1.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Built Distribution

coinmarketcap_connection-0.1.0-py3-none-any.whl (2.0 kB view hashes)

Uploaded 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