coinmarketcap-official/skills-for-ai-agents-by-coinmarketcap/cmc-api-crypto

Claude Code and agent skill by coinmarketcap-official/skills-for-ai-agents-by-coinmarketcap

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

API reference for CoinMarketCap cryptocurrency endpoints including quotes, listings, OHLCV, trending, and categories. Use this skill whenever the user mentions CMC API, asks how to get crypto data programmatically, wants to build price integrations, or needs REST endpoint documentation. This is the go-to reference for any CMC cryptocurrency API question. Trigger: "CMC API", "coinmarketcap api", "crypto price API", "get bitcoin price via API", "/cmc-api-crypto"

Install

npx vskill@latest install coinmarketcap-official/skills-for-ai-agents-by-coinmarketcap/cmc-api-crypto

SKILL.md

CoinMarketCap Cryptocurrency API

This skill covers the CoinMarketCap Cryptocurrency API endpoints for retrieving price data, market listings, historical quotes, trending coins, and token metadata.

Authentication

All requests require an API key in the header.

bash
curl -X GET "https://pro-api.coinmarketcap.com/v3/cryptocurrency/listings/latest" \
-H "X-CMC_PRO_API_KEY: your-api-key"

Get your API key at: https://pro.coinmarketcap.com/login

Base URL

https://pro-api.coinmarketcap.com

Common Use Cases

See use-cases.md for goal-based guidance on which endpoint to use:

  1. Get current price of a token
  2. Find a token's CMC ID from symbol or name
  3. Get a token by contract address
  4. Get top 100 coins by market cap
  5. Find coins in a price range
  6. Get historical price at a specific date
  7. Build a price chart (OHLCV data)
  8. Find where a coin trades
  9. Get all-time high and distance from ATH
  10. Find today's biggest gainers
  11. Discover newly listed coins
  12. Get all tokens in a category (e.g., DeFi)

API Overview

EndpointDescriptionReference
GET /v1/cryptocurrency/categoriesList all categories with market metricscategories.md
GET /v1/cryptocurrency/categorySingle category detailscategories.md
GET /v1/cryptocurrency/listings/historicalHistorical listings snapshotlistings.md
GET /v3/cryptocurrency/listings/latestCurrent listings with market datalistings.md
GET /v1/cryptocurrency/listings/newNewly added cryptocurrencieslistings.md
GET /v1/cryptocurrency/mapMap names/symbols to CMC IDsmap.md
GET /v1/cryptocurrency/trending/gainers-losersTop gainers and loserstrending.md
GET /v1/cryptocurrency/trending/latestCurrently trending coinstrending.md
GET /v1/cryptocurrency/trending/most-visitedMost visited on CMCtrending.md
GET /v2/cryptocurrency/infoStatic metadata (logo, description, URLs)info.md
GET /v2/cryptocurrency/market-pairs/latestTrading pairs for a coinmarket-pairs.md
GET /v2/cryptocurrency/ohlcv/historicalHistorical OHLCV candlesohlcv.md
GET /v2/cryptocurrency/ohlcv/latestLatest OHLCV dataohlcv.md
GET /v2/cryptocurrency/price-performance-stats/latestPrice performance statsprice-performance.md
GET /v3/cryptocurrency/quotes/latestLatest price quotesquotes.md
GET /v3/cryptocurrency/quotes/historicalHistorical price quotesquotes.md

Common Workflows

Get Token Price by Symbol
  1. First, map the symbol to a CMC ID using /v1/cryptocurrency/map
  2. Then fetch the price using /v3/cryptocurrency/quotes/latest
bash
# Step 1: Get CMC ID for ETH
curl -X GET "https://pro-api.coinmarketcap.com/v1/cryptocurrency/map?symbol=ETH" \
-H "X-CMC_PRO_API_KEY: your-api-key"
# Step 2: Get price quote (using id=1027 for ETH)
curl -X GET "https://pro-api.coinmarketcap.com/v3/cryptocurrency/quotes/latest?id=1027" \
-H "X-CMC_PRO_API_KEY: your-api-key"

The v3 response returns data as an array sorted by ID, and quote as an array with one object per convert currency, each carrying that currency's id and symbol. Read the price from the quote entry whose symbol is USD (the default). See quotes.md.

Get Top 100 Coins by Market Cap
bash
curl -X GET "https://pro-api.coinmarketcap.com/v3/cryptocurrency/listings/latest?limit=100&sort=market_cap" \
-H "X-CMC_PRO_API_KEY: your-api-key"
Get Historical Price Data
bash
curl -X GET "https://pro-api.coinmarketcap.com/v3/cryptocurrency/quotes/historical?id=1&time_start=2024-01-01&time_end=2024-01-31&interval=daily" \
-H "X-CMC_PRO_API_KEY: your-api-key"
Get Token Metadata
bash
curl -X GET "https://pro-api.coinmarketcap.com/v2/cryptocurrency/info?id=1,1027" \
-H "X-CMC_PRO_API_KEY: your-api-key"

Error Handling

HTTP Status Codes
CodeMeaning
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid API key)
403Forbidden (endpoint not available on your plan)
429Rate limit exceeded
500Server error
Rate Limits

Rate limits depend on your subscription plan. The response headers include:

  1. X-CMC_PRO_API_KEY_CREDITS_USED - Credits used this call
  2. X-CMC_PRO_API_KEY_CREDITS_LEFT - Credits remaining
Common Errors

Invalid ID: Ensure you use valid CMC IDs from the /map endpoint. Symbol lookups may return multiple matches.

Missing Required Parameter: Some endpoints require at least one identifier (id, slug, or symbol).

Plan Restrictions: Historical endpoints and some features require paid plans. Check your plan limits.

Error Response Format
json
{
"status": {
"timestamp": "2024-01-15T12:00:00.000Z",
"error_code": 400,
"error_message": "Invalid value for 'id'",
"credit_count": 0
}
}

Response Format

All responses follow this structure:

json
{
"status": {
"timestamp": "2024-01-15T12:00:00.000Z",
"error_code": 0,
"error_message": null,
"credit_count": 1
},
"data": { ... }
}

/v3/cryptocurrency/listings/latest and /v3/cryptocurrency/quotes/latest return error_code as a string ("0" on success) and error_message as an empty string, so compare error_code as a string or convert it first.

Reference Files

See the references/ directory for complete parameter and response documentation for each endpoint.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationPassed, 78 of 100Effective. 1 run. Evaluated 8 months ago.

Source

Popularity

Repository stars
39
Repository forks
8
7-day trend score
18

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 7 Apr 2026, 7 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/coinmarketcap-official/skills-for-ai-agents-by-coinmarketcap/cmc-api-crypto/badge)](https://verified-skill.com/skills/coinmarketcap-official/skills-for-ai-agents-by-coinmarketcap/cmc-api-crypto)

Something wrong with this skill or its page? Tell us.