agentleFS
Vo1ganinVo1ganin/crypto-claude-skills/skills/coinmarketcap/SKILL.md

coinmarketcap

Skill2 starsChanged 3 months agoMITView on GitHub

Expert assistant for CoinMarketCap Pro API — price quotes, listings, historical OHLCV, market metrics, Fear & Greed Index, CMC100/CMC20 indices, exchange data, DEX data, airdrops, trending, community sentiment. Covers 10+ endpoint categories across REST + MCP + x402 pay-per-call modes.

  • Reads credentials

2 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 1

    1. Vo1ganin/coinmarketcap-skill★ 197% same

    Wrote their own version · 1

    1. junct-bot/coinmarketcap-mcp★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check budget via GET /v1/key/info (free, 0 credits) before big sessions.

    line 67
  2. Very specific:

    Use IDs for all subsequent /quotes/*, /ohlcv/*, /info calls

    line 76
  3. Very specific:

    Use CMC for authoritative/historical/ranked data, DexScreener or chain-specific APIs for real-time DEX/token granularity.

    line 198

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CoinMarketCap Skill

Reference files:

  • references/endpoints.md — full catalog by category with credit formulas
  • references/credits.md — budget rules, cost estimation, plan tiers
  • references/patterns.md — batching, caching, CMC vs alternatives
  • references/examples/*.py — working Python scripts

🚨 Rule #1: credits, not requests

CoinMarketCap meters by credits, not by request count. The formula is:

credits_per_call = max(1, ceil(data_points_returned / 100))

Where data_points ≈ rows × columns × (1 + extra_convert_currencies).

Cheap calls (1 credit):

  • Up to 100 cryptos on quotes/latest
  • Up to 200 cryptos on listings/latest
  • Any single-token lookup (map, info, pools)
  • global-metrics, key/info, fiat/map

Expensive calls:

  • listings/latest?limit=5000 = 25 credits (verified)
  • ohlcv/historical with many points × many cryptos = points / 100
  • market-pairs/latest with 500+ pairs
  • Adding convert=USD,EUR,GBP → +1 credit per extra currency

Always check status.credit_count in response and log it.

🚨 Rule #2: budget thresholds (applied per call)

Estimated creditsAction
< 50Proceed silently
50–200Announce cost + reason before calling
> 200STOP. Propose alternative (narrower limit, targeted id list, cached data, different endpoint). Execute only with approval.

For batch jobs (N calls): threshold applied to total. 100 × 2 credits = 200 → announce. 100 × 5 = 500 → stop.

Check budget via GET /v1/key/info (free, 0 credits) before big sessions.

🚨 Rule #3: use CMC IDs, not symbols

Symbols collide (BTC might point to any of several tokens), can change, and break over time. CMC IDs are stable numeric identifiers.

Always:

  1. Resolve symbols/names once via /v1/cryptocurrency/map
  2. Cache the ID → (symbol, name) mapping on your side
  3. Use IDs for all subsequent /quotes/*, /ohlcv/*, /info calls

Example:

BTC → 1
ETH → 1027
SOL → 5426

🚨 Rule #4: batch aggressively

Single call endpoints accept many IDs:

  • /v2/cryptocurrency/quotes/latest?id=1,1027,5426,... — up to 100 IDs, still 1 credit
  • /v1/cryptocurrency/listings/latest?limit=200 — 1 credit for top 200
  • /v2/cryptocurrency/info?id=1,2,3,...,100 — 1 credit for 100 tokens' metadata

Never loop for sym in symbols: quote(sym). One call with all IDs saves N-1 credits and N-1 round trips.


Authentication

export CMC_API_KEY="..."
curl -H "X-CMC_PRO_API_KEY: $CMC_API_KEY" \
  "https://pro-api.coinmarketcap.com/v1/cryptocurrency/quotes/latest?symbol=BTC"

Base URL:

  • Production: https://pro-api.coinmarketcap.com
  • Sandbox (testing): https://sandbox-api.coinmarketcap.com

Step-by-step workflow

1. Classify the task

  • "What's the price of X?" → /v2/cryptocurrency/quotes/latest with id=<CMC_ID>
  • "Top N by market cap" → /v1/cryptocurrency/listings/latest?limit=N
  • "Historical price chart" → /v3/cryptocurrency/quotes/historical or /v2/cryptocurrency/ohlcv/historical
  • "What's trending right now" → /v1/cryptocurrency/trending/latest
  • "Global market stats" → /v1/global-metrics/quotes/latest
  • "Fear & Greed" → /v3/fear-and-greed/latest
  • "Exchange volume" → /v1/exchange/listings/latest or /v1/exchange/quotes/latest
  • "DEX token details" → /v1/dex/token (needs network_slug + contract_address)

2. Resolve any symbols to CMC IDs first (if you don't have them cached)

curl "$BASE/v1/cryptocurrency/map?symbol=BTC,ETH,SOL" -H "X-CMC_PRO_API_KEY: $KEY"

3. Estimate credits — see references/credits.md. Apply thresholds.

4. Execute — batch as much as the endpoint allows.

5. Log status.credit_count from response. If the user has ongoing budget concerns, run /v1/key/info periodically.

6. Present results — format USD with commas, timestamps to local, mcap in B/T (billions/trillions).

Common recipes

Price for 50 tokens right now

ids = ",".join([str(cmc_id) for cmc_id in coins])  # up to 100
r = httpx.get(f"{BASE}/v2/cryptocurrency/quotes/latest?id={ids}",
              headers={"X-CMC_PRO_API_KEY": KEY})
# 1 credit, one round trip

Daily OHLCV for BTC, last 90 days

r = httpx.get(f"{BASE}/v2/cryptocurrency/ohlcv/historical",
              params={"id": 1, "count": 90, "interval": "daily"},
              headers={"X-CMC_PRO_API_KEY": KEY})
# 1 credit (90 points < 100)

Top 200 coins by mcap

r = httpx.get(f"{BASE}/v1/cryptocurrency/listings/latest?limit=200",
              headers={"X-CMC_PRO_API_KEY": KEY})
# 1 credit

Fear & Greed today + 30 days back

r = httpx.get(f"{BASE}/v3/fear-and-greed/historical?count=30",
              headers={"X-CMC_PRO_API_KEY": KEY})

Live budget check

curl -H "X-CMC_PRO_API_KEY: $KEY" "$BASE/v1/key/info"
# 0 credits; returns plan, usage, remaining

See references/examples/ for complete runnable scripts.

Error handling

HTTPCMC codeMeaningAction
4011001Invalid keyCheck env var
4011002Missing key headerAdd X-CMC_PRO_API_KEY
4031006Endpoint not in planReport to user; find alternative
4291008Minute limit hitSleep 60s
4291009Daily limitAwait daily reset or upgrade
4291010Monthly limitAwait monthly reset or upgrade
4291011IP rate limitLower concurrency
500—Server errorExponential backoff, then report

CoinMarketCap vs alternatives

NeedBest
Authoritative price + market cap rankingsCMC (what the industry references)
Live DEX pair data on specific chainDexScreener (free) or GeckoTerminal
On-chain Solana-specificSolscan, Helius
Historical 5y+ OHLCVCMC (Professional plan, all-time)
Rich metadata (logos, descriptions, URLs)CMC /v2/cryptocurrency/info
Exchange volume over timeCMC /v1/exchange/quotes/historical
Fear & Greed IndexCMC /v3/fear-and-greed/* (authoritative source)
Broad trending + community pulseCMC /community/trending/* + /content/*

Use CMC for authoritative/historical/ranked data, DexScreener or chain-specific APIs for real-time DEX/token granularity.

Reference files

  • references/endpoints.md — catalog + credit formulas, tier requirements
  • references/credits.md — budget rules, plan comparison, cost estimation heuristics
  • references/patterns.md — batching, caching, when to use CMC
  • references/examples/fetch_prices_batch.py — bulk quote fetch with ID resolution
  • references/examples/historical_ohlcv.py — daily candles for analysis
  • references/examples/global_dashboard.py — global metrics + F&G + trending in one shot

Related skills

  • dexscreener-skill — free/no-auth DEX pair data
  • dune-skill — historical SQL with deeper granularity than CMC OHLCV
  • solana-rpc-skill — on-chain Solana specifics
  • nansen-skill — smart-money + wallet profiling (orthogonal to CMC)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.