jeremylongshore/tons-of-skills-marketplace / plugins/crypto/market-price-tracker/skills/tracking-crypto-prices
tracking-crypto-prices
FlaggedTrack 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".
| File | Kind | Size |
|---|---|---|
| ARD.md | markdown | 26.8 KB |
| PRD.md | markdown | 19.0 KB |
| SKILL.md | skill md | 4.4 KB |
| config/settings.yaml | config | 4.0 KB |
| references/errors.md | markdown | 5.7 KB |
| references/examples.md | markdown | 10.1 KB |
| references/implementation.md | markdown | 3.9 KB |
| scripts/api_client.py | script | 15.8 KB |
| scripts/cache_manager.py | script | 10.7 KB |
| scripts/formatters.py | script | 12.4 KB |
| scripts/price_tracker.py | script | 11.6 KB |
references/examples.md
View on GitHub# Usage Examples
Comprehensive examples for the tracking-crypto-prices skill.
## Quick Start Examples
### Example 1: Get Single Price
The simplest use case - check the current price of Bitcoin:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC
```
**Output:**
```
BTC (Bitcoin)
$97,234.56 USD
+2.34% (24h) | Vol: $28.5B | MCap: $1.92T
```
---
### Example 2: Check Multiple Prices
Get prices for a portfolio of assets:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbols BTC,ETH,SOL,AVAX,DOT
```
**Output:**
```
================================================================================
CRYPTO PRICES Updated: 2025-01-14 15:30:00
================================================================================
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
AVAX $38.92 -0.45% $425.6M $14.2B
DOT $7.23 +3.21% $198.3M $9.8B
--------------------------------------------------------------------------------
Total 24h Change: +2.44% (weighted)
================================================================================
```
---
### Example 3: Use a Watchlist
Scan predefined watchlists for quick market overview:
```bash
# Top 10 by market cap
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist top10
# DeFi tokens
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist defi
# Layer 2 solutions
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist layer2
# Stablecoins
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist stablecoins
```
---
## Output Format Examples
### Example 4: JSON Output
Machine-readable output for scripting:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol ETH --format json
```
**Output:**
```json
{
"prices": [
{
"symbol": "ETH",
"name": "Ethereum",
"price": 3456.78,
"currency": "USD",
"change_24h": 1.87,
"change_7d": 5.42,
"volume_24h": 12300000000,
"market_cap": 415200000000,
"timestamp": "2025-01-14T15:30:00.000000",
"source": "coingecko"
}
],
"meta": {
"count": 1,
"currency": "USD",
"timestamp": "2025-01-14T15:30:00.000000"
}
}
```
---
### Example 5: CSV Export
Export prices for spreadsheet analysis:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbols BTC,ETH,SOL --format csv --output prices.csv
```
**Output (prices.csv):**
```csv
symbol,name,price,currency,change_24h,change_7d,volume_24h,market_cap,timestamp,source
BTC,Bitcoin,97234.56,USD,2.34,8.21,28500000000,1920000000000,2025-01-14T15:30:00.000000,coingecko
ETH,Ethereum,3456.78,USD,1.87,5.42,12300000000,415200000000,2025-01-14T15:30:00.000000,coingecko
SOL,Solana,142.34,USD,5.12,12.8,2100000000,61400000000,2025-01-14T15:30:00.000000,coingecko
```
---
### Example 6: Minimal Output
Single-line output for shell scripts:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbols BTC,ETH --format minimal
```
**Output:**
```
BTC:$97,234.56(+2.34%) | ETH:$3,456.78(+1.87%)
```
Use in shell scripts:
```bash
#!/bin/bash
PRICES=$(python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbols BTC,ETH --format minimal)
echo "Current prices: $PRICES"
```
---
## Historical Data Examples
### Example 7: 30-Day History
Get price history for the last 30 days:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --period 30d
```
**Output:**
```
================================================================================
HISTORICAL PRICES: BTC
Period: 2024-12-15 to 2025-01-14
================================================================================
Date Price Volume
--------------------------------------------------------------------------------
2024-12-15 $95,123.45 $24.3B
2024-12-16 $94,567.89 $22.1B
...
2025-01-13 $96,789.01 $26.8B
2025-01-14 $97,234.56 $28.5B
--------------------------------------------------------------------------------
Total data points: 30
================================================================================
```
---
### Example 8: Custom Date Range
Fetch history for a specific period:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol ETH --start 2024-01-01 --end 2024-12-31
```
---
### Example 9: Export Historical Data to CSV
Export OHLCV data for analysis:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --period 90d --format csv --output btc_90d.csv
```
**Output (btc_90d.csv):**
```csv
date,price,volume
2024-10-16,68234.56,18500000000
2024-10-17,69123.45,19200000000
...
```
---
## Currency Examples
### Example 10: Different Fiat Currencies
Get prices in alternative currencies:
```bash
# Euro
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --currency EUR
# British Pound
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --currency GBP
# Japanese Yen
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --currency JPY
```
---
## Search Examples
### Example 11: Search for Coins
Find available cryptocurrencies:
```bash
# Search by name
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --list --query ethereum
# Search by partial name
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --list --query layer
```
**Output:**
```
================================================================================
SEARCH RESULTS: 'ethereum'
================================================================================
Symbol ID Name
--------------------------------------------------------------------------------
ETH ethereum Ethereum
ETC ethereum-classic Ethereum Classic
ETHW ethereum-pow Ethereum PoW
...
--------------------------------------------------------------------------------
Total: 15 coins
================================================================================
```
---
## Cache Management Examples
### Example 12: Bypass Cache
Force fresh data fetch:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --no-cache
```
---
### Example 13: Clear Cache
Remove all cached data:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --clear-cache
```
---
## Integration Examples
### Example 14: Portfolio Value Calculation
Use with other skills for portfolio tracking:
```python
# In crypto-portfolio-tracker skill
from price_tracker import get_current_prices
# Get current prices
prices = get_current_prices(["BTC", "ETH", "SOL"])
# Calculate portfolio value
holdings = {"BTC": 0.5, "ETH": 10, "SOL": 100}
total_value = sum(
prices[symbol]["price"] * amount
for symbol, amount in holdings.items()
)
print(f"Portfolio Value: ${total_value:,.2f}")
```
---
### Example 15: Shell Script Integration
Use in automated scripts:
```bash
#!/bin/bash
# Get BTC price as JSON and extract value
BTC_PRICE=$(python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --format json | jq '.prices[0].price')
# Alert if price drops below threshold
if (( $(echo "$BTC_PRICE < 90000" | bc -l) )); then
echo "ALERT: Bitcoin below $90,000!"
fi
```
---
### Example 16: Cron Job for Price Logging
Automated price logging:
```bash
# Add to crontab (crontab -e)
# Log prices every 5 minutes
*/5 * * * * python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist top10 --format csv >> /var/log/crypto_prices.csv
```
---
## Advanced Examples
### Example 17: Multi-Timeframe Analysis
Combine spot and historical data:
```bash
# Current price
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC
# 7-day trend
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --period 7d
# 30-day trend
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --period 30d
# Year-to-date
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --start 2025-01-01 --end $(date +%Y-%m-%d)
```
---
### Example 18: Verbose Debugging
Debug API and cache behavior:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --verbose
```
**Output:**
```
[DEBUG] Checking cache for spot:btc:usd
[DEBUG] Cache miss
[DEBUG] Fetching from CoinGecko API
[DEBUG] API call: /coins/bitcoin
[DEBUG] Response received in 0.234s
[DEBUG] Caching result (TTL: 30s)
BTC (Bitcoin)
$97,234.56 USD
+2.34% (24h) | Vol: $28.5B | MCap: $1.92T
Cache: 0/1 hits
```
---
### Example 19: Custom Watchlist
Create and use a custom watchlist:
1. Edit `config/settings.yaml`:
```yaml
watchlists:
custom:
- bitcoin
- ethereum
- solana
- chainlink
- uniswap
```
1. Use it:
```bash
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --watchlist custom
```
---
## Error Recovery Examples
### Example 20: Handling Rate Limits
When rate limited, the skill automatically:
1. Uses cached data if available
2. Falls back to yfinance if installed
3. Shows stale data with warning
```bash
# Force yfinance fallback (for testing)
# Temporarily disable CoinGecko by rate limiting
python ${CLAUDE_SKILL_DIR}/scripts/price_tracker.py --symbol BTC --verbose
```
**Output with fallback:**
```
[DEBUG] CoinGecko rate limited
[DEBUG] Falling back to yfinance
[DEBUG] yfinance: BTC-USD
BTC (Bitcoin)
$97,234.56 USD (source: yfinance)
```
---
## Best Practices
1. **Use caching**: Default 30-second cache reduces API calls
2. **Batch requests**: Use `--symbols` instead of multiple single requests
3. **Use watchlists**: Predefined lists are optimized for common use cases
4. **Export for analysis**: Use `--format csv` for spreadsheet work
5. **Script with JSON**: Use `--format json` for programmatic access
---
*[Tons of Skills](https://tonsofskills.com) by [Intent Solutions](https://intentsolutions.io) | [jeremylongshore.com](https://jeremylongshore.com)*
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |