Stock & Crypto Prices Skill
Check current prices using free APIs.
Crypto Prices
curl -s "https://api.coingecko.com/api/v3/simple/price?ids={coin}&vs_currencies=usd&include_24hr_change=true" | python3 -m json.tool
Common IDs: bitcoin, ethereum, solana, cardano, dogecoin
Multiple Cryptos
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum,solana&vs_currencies=usd&include_24hr_change=true" | python3 -c "
import json, sys
data = json.load(sys.stdin)
for coin, info in data.items():
price = info['usd']
change = info.get('usd_24h_change', 0)
arrow = '▲' if change >= 0 else '▼'
print(f'{coin:12s} ${price:>10,.2f} {arrow} {abs(change):.1f}%')
"
Notes
- CoinGecko API is free (rate limited to ~10-30 req/min)
- For stocks, suggest the user check Yahoo Finance or Google Finance
- Always note that prices are delayed/indicative