← 返回 Skills 市场
bryan-cmc

CoinMarketCap Market Overview APIs

作者 CoinMarketCap · GitHub ↗ · v1.0.1
cross-platform ⚠ suspicious
598
总下载
2
收藏
1
当前安装
2
版本数
在 OpenClaw 中安装
/install cmc-api-market
功能描述
API reference for CoinMarketCap market-wide endpoints including global metrics, fear/greed, indices, trending topics, and charts. Use this skill whenever the...
使用说明 (SKILL.md)

CoinMarketCap Market API Skill

This skill covers market-wide cryptocurrency data including global metrics, sentiment indicators, market indices, community activity, news content, charting data, and utility endpoints.

Authentication

All requests require the X-CMC_PRO_API_KEY header.

curl -X GET "https://pro-api.coinmarketcap.com/v1/global-metrics/quotes/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 market sentiment (Fear & Greed)
  2. Get total crypto market cap
  3. Get BTC dominance
  4. Track market cap history
  5. Track Fear & Greed history
  6. Get CMC100 index performance
  7. Compare CMC100 vs CMC20
  8. Get OHLCV candlestick data for charts
  9. Get simple price time series
  10. Get community trending tokens
  11. Get trending discussion topics
  12. Get latest crypto news
  13. Convert currency amounts
  14. Check API usage and limits
  15. Get fiat currency IDs

API Overview

Global Metrics

Endpoint Description Reference
GET /v1/global-metrics/quotes/historical Historical global market metrics global-metrics.md
GET /v1/global-metrics/quotes/latest Latest total market cap, BTC dominance global-metrics.md

Fear and Greed Index

Endpoint Description Reference
GET /v3/fear-and-greed/historical Historical fear/greed values fear-greed.md
GET /v3/fear-and-greed/latest Current market sentiment score fear-greed.md

Market Indices

Endpoint Description Reference
GET /v3/index/cmc100-historical CMC100 index history indices.md
GET /v3/index/cmc100-latest CMC100 current value indices.md
GET /v3/index/cmc20-historical CMC20 index history indices.md
GET /v3/index/cmc20-latest CMC20 current value indices.md

Community

Endpoint Description Reference
GET /v1/community/trending/token Trending tokens by community activity community.md
GET /v1/community/trending/topic Trending discussion topics community.md

Content

Endpoint Description Reference
GET /v1/content/latest Latest news and Alexandria articles content.md
GET /v1/content/posts/comments Comments on a specific post content.md
GET /v1/content/posts/latest Latest community posts content.md
GET /v1/content/posts/top Top ranked community posts content.md

K-Line Charts

Endpoint Description Reference
GET /v1/k-line/candles OHLCV candlestick data kline.md
GET /v1/k-line/points Time series price/market cap points kline.md

Tools

Endpoint Description Reference
GET /v1/fiat/map Map fiat currencies to CMC IDs tools.md
GET /v1/key/info API key usage and plan details tools.md
GET /v2/tools/price-conversion Convert between currencies tools.md

Common Workflows

Get Market Sentiment Overview

  1. Fetch fear/greed index: /v3/fear-and-greed/latest
  2. Get global metrics: /v1/global-metrics/quotes/latest
  3. Combine for sentiment analysis with market cap context

Track Market Index Performance

  1. Get current CMC100 value: /v3/index/cmc100-latest
  2. Fetch historical data: /v3/index/cmc100-historical
  3. Compare performance over time

Monitor Community Activity

  1. Check trending tokens: /v1/community/trending/token
  2. Review trending topics: /v1/community/trending/topic
  3. Read latest posts: /v1/content/posts/top

Build Price Charts

  1. Fetch OHLCV candles: /v1/k-line/candles
  2. Use interval parameter for timeframe (1h, 4h, 1d)
  3. Plot candlestick chart with returned data

Currency Conversion

  1. Get fiat currency IDs: /v1/fiat/map
  2. Convert amounts: /v2/tools/price-conversion

Error Handling

Status Code Meaning Action
400 Bad Request Check parameter values and format
401 Unauthorized Verify API key is valid
403 Forbidden Endpoint not available on your plan
429 Rate Limited Wait and retry with backoff
500 Server Error Retry after delay

Error Response Format

{
  "status": {
    "error_code": 400,
    "error_message": "Invalid value for 'id'"
  }
}

Rate Limit Headers

Check these response headers to monitor usage:

  1. X-CMC_PRO_API_KEY_CREDITS_USED - Credits consumed
  2. X-CMC_PRO_API_KEY_CREDITS_REMAINING - Credits left
  3. X-CMC_PRO_API_KEY_RATE_LIMIT - Requests per minute limit

Response Format

All endpoints return JSON with this structure:

{
  "status": {
    "timestamp": "2024-01-15T10:30:00.000Z",
    "error_code": 0,
    "error_message": null,
    "credit_count": 1
  },
  "data": { }
}

Tips

  1. Use the /v1/key/info endpoint to check your plan limits before heavy usage
  2. Cache global metrics data as it updates every few minutes
  3. Fear/greed index updates daily, no need for frequent polling
  4. K-line data supports multiple intervals for different chart timeframes
  5. Community trending data refreshes periodically throughout the day
安全使用建议
This skill is a documentation-only wrapper around CoinMarketCap's market APIs. Before using it, make sure you: (1) supply a valid CoinMarketCap API key (keep it secret and don’t paste it in public prompts); (2) understand API billing/credit limits and rate limits (examples reference rate-limit headers); and (3) be aware that the skill will make network requests to pro-api.coinmarketcap.com (no other endpoints are referenced). If you want the agent to call the API autonomously, provide the key via a secure credential mechanism rather than embedding it in prompts.
功能分析
Type: OpenClaw Skill Name: cmc-api-market Version: 1.0.1 The skill bundle is classified as suspicious due to the broad permissions granted to the AI agent, specifically `allowed-tools: - Bash - Read` in `SKILL.md`. While the provided `curl` examples demonstrate legitimate API interactions with `pro-api.coinmarketcap.com` and there is no explicit malicious code or prompt injection attempt within the skill's instructions, granting `Bash` access allows for arbitrary command execution and `Read` allows local file access. These capabilities, if exploited by a malicious user via prompt injection, could lead to remote code execution or data exfiltration, representing a significant vulnerability rather than intentional malice within the skill bundle itself.
能力评估
Purpose & Capability
The skill is an API reference for CoinMarketCap market endpoints and the included files exclusively document endpoints, parameters, examples, and use cases — which matches the name and description.
Instruction Scope
SKILL.md contains only API documentation and curl examples against pro-api.coinmarketcap.com; it does not instruct the agent to read unrelated local files, access unrelated credentials, or transmit data to third-party endpoints outside CoinMarketCap.
Install Mechanism
This is instruction-only with no install spec or downloaded code, so nothing is written to disk or installed at agent runtime.
Credentials
The documentation states all requests require the X-CMC_PRO_API_KEY header, but the skill metadata does not declare a primary credential or required env var. This is not malicious — the examples use a placeholder API key — but users should ensure they supply a valid CMC API key securely (the skill itself does not request unrelated secrets).
Persistence & Privilege
always:false and user-invocable:true. The skill does not request persistent presence or modify other skills or system configs; autonomous invocation is allowed by default but not combined with other red flags here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cmc-api-market
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cmc-api-market 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- Added homepage and source links to the skill metadata for easier access to documentation and project repository. - No other changes to functionality or API documentation.
v1.0.0
Initial release – CoinMarketCap market-wide API reference skill. - Provides comprehensive documentation for global metrics, fear/greed index, market indices, trending topics, community activity, k-line (chart) data, and tools endpoints. - Includes authentication requirements and sample requests. - Lists common use cases such as market sentiment analysis, BTC dominance, market cap tracking, charting, trending tokens, and currency conversion. - Details error handling, rate limits, and API response formats. - Offers workflow examples for using multiple endpoints together.
元数据
Slug cmc-api-market
版本 1.0.1
许可证
累计安装 1
当前安装数 1
历史版本数 2
常见问题

CoinMarketCap Market Overview APIs 是什么?

API reference for CoinMarketCap market-wide endpoints including global metrics, fear/greed, indices, trending topics, and charts. Use this skill whenever the... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 598 次。

如何安装 CoinMarketCap Market Overview APIs?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cmc-api-market」即可一键安装,无需额外配置。

CoinMarketCap Market Overview APIs 是免费的吗?

是的,CoinMarketCap Market Overview APIs 完全免费(开源免费),可自由下载、安装和使用。

CoinMarketCap Market Overview APIs 支持哪些平台?

CoinMarketCap Market Overview APIs 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 CoinMarketCap Market Overview APIs?

由 CoinMarketCap(@bryan-cmc)开发并维护,当前版本 v1.0.1。

💬 留言讨论