---
name: mohitagw15856/crypto-prices
source: https://app.decimal.ai/s/mohitagw15856-crypto-prices@1/SKILL.md
source_sha256: 0e3ba66d4886
---

# 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

1. **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.
2. **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.
3. **Timestamp every answer:** include `include_last_updated_at` and print it; crypto moves percent-per-hour on bad days, and an undated price is misinformation waiting to age.
4. **Context is the value-add:** "$63,977, down 2.1% in 24h" answers "how's bitcoin"; the bare price doesn't. For "how's the market," compare BTC + ETH + a top-alt rather than editorializing.
5. **The line that never moves:** prices are informational; no buy/sell/hold, no predictions, no portfolio math presented as guidance. "Is now a good time to buy" gets the price, the volatility fact, and a clean refusal to predict.

## Output Format

# [Coin] Price

**[Price] [currency]** · 24h: [±x.x%] [· rank/context if asked]

[Multi-coin questions: small table, one row per coin]

Source: [CoinGecko / Coinbase] at [timestamp, UTC] · rerun: `[exact curl]`
*Live snapshot, already aging — informational only, not investment advice.*

## Quality Checks

- [ ] The coin id was resolved unambiguously (searched when the ticker could collide)
- [ ] 24h change accompanies the price
- [ ] The timestamp appears in the answer
- [ ] Multi-coin requests were batched into one call
- [ ] The not-advice line appears verbatim in spirit — every time

## Anti-Patterns

- [ ] Do not answer from memory — a remembered crypto price is fiction; fetch or hand over the command
- [ ] Do not guess which coin a ticker means — search and confirm; $PEPE-class collisions burn people
- [ ] Do not loop per-coin requests against a rate-limited public API — batch
- [ ] Do not predict, recommend, or imply timing — the refusal is part of the skill
- [ ] Do not quote without the timestamp — undated crypto prices are misinformation with confidence