tracking-crypto-prices
Original:🇺🇸 English
Not Translated
4 scriptsChecked / no sensitive code detected
Track real-time cryptocurrency prices across exchanges with historical data and alerts. Provides price data infrastructure for dependent skills (portfolio, tax, DeFi, arbitrage). Use when checking crypto prices, monitoring markets, or fetching historical price data. Trigger with phrases like "check price", "BTC price", "crypto prices", "price history", "get quote for", "what's ETH trading at", "show me top coins", or "track my watchlist".
1installs
Sourceaaaaqwq/agi-super-skills
Added on
NPX Install
npx skill4agent add aaaaqwq/agi-super-skills tracking-crypto-pricesSKILL.md Content
Tracking Crypto Prices
Overview
Foundation skill providing real-time and historical cryptocurrency price data. This skill is the data layer for the crypto plugin ecosystem - 10+ other skills depend on it for price information.
Key Capabilities:
- Real-time prices for 10,000+ cryptocurrencies
- Historical OHLCV data (1 day to all-time)
- Multi-currency support (USD, EUR, GBP, 30+ currencies)
- Intelligent caching to minimize API calls
- Predefined and custom watchlists
- Export to CSV/JSON for analysis
Dependent Skills:
This skill provides price data to: market-movers-scanner, crypto-portfolio-tracker, crypto-tax-calculator, defi-yield-optimizer, liquidity-pool-analyzer, staking-rewards-optimizer, crypto-derivatives-tracker, dex-aggregator-router, options-flow-analyzer, arbitrage-opportunity-finder.
Prerequisites
Install required dependencies:
bash
pip install requests pandas yfinanceOptional for advanced features:
bash
pip install python-dotenv # For API key managementAPI Setup (optional, for higher rate limits):
- Get free API key from https://www.coingecko.com/en/api
- Add to or set environment variable
{baseDir}/config/settings.yamlCOINGECKO_API_KEY
Instructions
Step 1: Quick Price Check
Get current price for any cryptocurrency:
bash
python {baseDir}/scripts/price_tracker.py --symbol BTCCheck multiple assets:
bash
python {baseDir}/scripts/price_tracker.py --symbols BTC,ETH,SOLStep 2: Use Watchlists
Scan predefined watchlists:
bash
# Top 10 by market cap
python {baseDir}/scripts/price_tracker.py --watchlist top10
# DeFi tokens
python {baseDir}/scripts/price_tracker.py --watchlist defi
# Layer 2 tokens
python {baseDir}/scripts/price_tracker.py --watchlist layer2Available watchlists: , , , ,
top10defilayer2stablecoinsmemecoinsStep 3: Fetch Historical Data
Get OHLCV (Open, High, Low, Close, Volume) history:
bash
# Last 30 days
python {baseDir}/scripts/price_tracker.py --symbol BTC --period 30d
# Last 90 days with CSV export
python {baseDir}/scripts/price_tracker.py --symbol BTC --period 90d --output csv
# Custom date range
python {baseDir}/scripts/price_tracker.py --symbol ETH --start 2024-01-01 --end 2024-12-31Step 4: Configure Settings
Edit to customize:
{baseDir}/config/settings.yamlyaml
cache:
spot_ttl: 30 # Seconds to cache spot prices
historical_ttl: 3600 # Seconds to cache historical data
currency:
default: usd # Default fiat currency
watchlists:
custom: # Add your own watchlist
- BTC
- ETH
- SOLOutput
Price Table (Default)
================================================================================
CRYPTO PRICES Updated: [timestamp]
================================================================================
Symbol Price (USD) 24h Change Volume (24h) Market Cap
--------------------------------------------------------------------------------
BTC $97,234.56 +2.34% $28.5B $1.92T
ETH $3,456.78 +1.87% $12.3B $415.2B
SOL $142.34 +5.12% $2.1B $61.4B
--------------------------------------------------------------------------------
Total 24h Change: +2.44% (weighted)
================================================================================JSON Output (--format json)
json
{
"prices": [
{
"symbol": "BTC",
"name": "Bitcoin",
"price": 97234.56,
"currency": "USD",
"change_24h": 2.34,
"volume_24h": 28500000000,
"market_cap": 1920000000000,
"timestamp": "[timestamp]",
"source": "coingecko"
}
],
"meta": {
"count": 1,
"currency": "USD",
"cached": false
}
}Historical CSV Export
csv
date,open,high,low,close,volume
[date],95000.00,96500.00,94200.00,96100.00,25000000000
[date],96100.00,97800.00,95800.00,97500.00,27000000000Configuration
Edit :
{baseDir}/config/settings.yamlyaml
# API Configuration
api:
coingecko:
api_key: ${COINGECKO_API_KEY} # Optional, from env
use_pro: false
yfinance:
enabled: true # Fallback source
# Cache Configuration
cache:
enabled: true
spot_ttl: 30 # Spot price TTL (seconds)
historical_ttl: 3600 # Historical data TTL (seconds)
directory: ./data
# Display Configuration
currency:
default: usd
supported:
- usd
- eur
- gbp
- jpy
- cad
- aud
# Predefined Watchlists
watchlists:
top10:
- bitcoin
- ethereum
- tether
- binancecoin
- solana
- ripple
- cardano
- avalanche-2
- dogecoin
- polkadot
defi:
- uniswap
- aave
- chainlink
- maker
- compound-governance-token
- curve-dao-token
- sushi
layer2:
- matic-network
- arbitrum
- optimism
- immutable-xError Handling
See for comprehensive error handling.
{baseDir}/references/errors.mdCommon Errors
| Error | Cause | Solution |
|---|---|---|
| Invalid cryptocurrency ticker | Check spelling, use |
| Too many API calls | Wait 60s, or use API key for higher limits |
| No internet connection | Check connection, cached data will be used |
| Cached data older than TTL | Data still shown with warning, will refresh |
Rate Limit Handling
The skill automatically:
- Uses cached data when available
- Applies exponential backoff on rate limits
- Falls back to yfinance if CoinGecko fails
- Shows stale cache data with warning as last resort
Examples
See for detailed examples including:
{baseDir}/references/examples.md- Multi-timeframe analysis
- Portfolio value calculation
- Price alert setup
- Integration with other skills
Example 1: Quick Price Check
bash
python {baseDir}/scripts/price_tracker.py --symbol BTCOutput:
BTC (Bitcoin)
$97,234.56 USD
+2.34% (24h) | Vol: $28.5B | MCap: $1.92TExample 2: Watchlist Scan
bash
python {baseDir}/scripts/price_tracker.py --watchlist top10Example 3: Historical Export
bash
python {baseDir}/scripts/price_tracker.py --symbol ETH --period 90d --output csvCreates:
{baseDir}/data/ETH_90d_[date].csvIntegration with Other Skills
This skill provides the price data foundation for other crypto skills.
Direct Import (recommended for Python skills):
python
from price_tracker import get_current_prices, get_historical_prices
# Get prices for portfolio valuation
prices = get_current_prices(["BTC", "ETH", "SOL"])CLI Subprocess (for non-Python or isolation):
bash
PRICES=$(python {baseDir}/scripts/price_tracker.py --symbols BTC,ETH --format json)Shared Cache (efficient for batch):
Multiple skills can read from to avoid redundant API calls.
{baseDir}/data/cache.jsonFiles
| File | Purpose |
|---|---|
| Main CLI entry point |
| CoinGecko/yfinance abstraction |
| Cache read/write/invalidation |
| Output formatting |
| User configuration |
| Price cache (auto-generated) |
Resources
- CoinGecko API - Primary data source
- yfinance - Fallback for historical data
- PRD.md - Product requirements
- ARD.md - Architecture documentation