A Streamlit connector for the CoinMarketCap API.
Project description
CoinMarketCap Connection for Streamlit
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
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.
Source Distribution
Built Distribution
File details
Details for the file coinmarketcap_connection-0.1.0.tar.gz
.
File metadata
- Download URL: coinmarketcap_connection-0.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22b33e9bad5734d105ffe41115828c0ad344a5ed2400f7faa676b0db2a448989 |
|
MD5 | debeedf4ec108c6e9d79a3c41b4b6335 |
|
BLAKE2b-256 | 91a31ba7c00be4775ae0ce86638b5bea2dea8f65dc273a60b1ea43d6266399ce |
File details
Details for the file coinmarketcap_connection-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: coinmarketcap_connection-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4806d4a2ef98448fb74b40a81e5ed238b1b0e8c1b80098b786ffcedcb714f9 |
|
MD5 | a642c25ce31cd16b670436c32456033f |
|
BLAKE2b-256 | 0d197f309e8117b6d7d438c7ddbc8cbb1cdcdfccc749a164ea757764ff5e16de |