SKILL.md
Crypto Prices Skill
Crypto prices are the most-asked live number after weather, and two services answer keylessly: CoinGecko's public API (thousands of coins, market context, any quote currency) and Coinbase's spot endpoint (fast, reliable, majors only). This skill fetches, adds the 24-hour context that turns a number into information, and carries the caveat every crypto answer owes: this number is already stale, and it is not advice.
What This Skill Produces
- The price — stated first, in the asked currency, with 24h change alongside
- Context — 24h high/low or market-cap rank when the question implies "how's it doing"
- The command — exact curl, rerunnable
- The caveat — timestamped, volatile, informational-only
Required Inputs
Ask for these if not provided:
- The coin(s) — resolve names to CoinGecko ids (bitcoin, ethereum, solana…); for obscure tickers, search first:
https://api.coingecko.com/api/v3/search?query=name— ticker collisions are common and the wrong coin is a real failure mode - Quote currency — usd default, but honor the user's (CoinGecko quotes in dozens:
vs_currencies=eur,inr,jpy) - Depth — a number, or market context (change, volume, rank)?
Framework: The Two Sources
- CoinGecko — primary: simple price:
curl -s "https://api.coingecko.com/api/v3/simple/price?ids=bitcoin,ethereum&vs_currencies=usd&include_24hr_change=true&include_24hr_vol=true&include_last_updated_at=true"· richer context:.../api/v3/coins/markets?vs_currency=usd&ids=bitcoin,ethereum(adds rank, high/low, ATH distance) · trending:.../api/v3/search/trending. Public tier rate-limits (~10–30 req/min) — batch ids into one call, never loop. - Coinbase — fallback for majors:
curl -s "https://api.coinbase.com/v2/prices/BTC-USD/spot"— extremely reliable, majors and USD/EUR/GBP pairs, no market context. Use when CoinGecko rate-limits or for a fast single number. - Timestamp every answer: include and print it; crypto moves percent-per-hour on bad days, and an undated price is misinformation waiting to age.
