← 返回 Skills 市场
bryan-cmc

CoinMarketCap Exchange APIs

作者 CoinMarketCap · GitHub ↗ · v1.0.2
cross-platform ⚠ suspicious
516
总下载
0
收藏
1
当前安装
3
版本数
在 OpenClaw 中安装
/install cmc-api-exchange
功能描述
API reference for CoinMarketCap exchange endpoints including exchange info, volume, market pairs, and assets. Use this skill whenever the user mentions excha...
使用说明 (SKILL.md)

CoinMarketCap Exchange API Skill

This skill covers CoinMarketCap APIs for centralized cryptocurrency exchanges (Binance, Coinbase, Kraken, etc.). Use these endpoints to retrieve exchange metadata, trading volumes, market pairs, and asset holdings.

Authentication

All requests require an API key in the header.

  1. Get your API key at https://pro.coinmarketcap.com/login
  2. Include the header X-CMC_PRO_API_KEY: your-api-key in all requests
curl -X GET "https://pro-api.coinmarketcap.com/v1/exchange/map" \
  -H "X-CMC_PRO_API_KEY: your-api-key"

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 exchange information by name
  2. Find an exchange's CMC ID
  3. Get top exchanges by volume
  4. Get only spot exchanges (or only derivatives)
  5. Get current volume for a specific exchange
  6. Compare volume across multiple exchanges
  7. Get historical volume for an exchange
  8. Get all trading pairs on an exchange
  9. Find BTC pairs on an exchange
  10. Get perpetual/futures pairs on an exchange
  11. Check exchange reserves (proof-of-reserves)
  12. Find exchanges that list a specific coin

API Overview

Endpoint Description Reference
GET /v1/exchange/map Map exchange names to CMC IDs references/info.md
GET /v1/exchange/info Exchange metadata (logo, URLs, description) references/info.md
GET /v1/exchange/listings/latest List all exchanges with market data references/listings.md
GET /v1/exchange/quotes/latest Latest exchange volume and metrics references/quotes.md
GET /v1/exchange/quotes/historical Historical exchange volume data references/quotes.md
GET /v1/exchange/market-pairs/latest Trading pairs on an exchange references/market-pairs.md
GET /v1/exchange/assets Assets held by an exchange references/assets.md

Common Workflows

Get Exchange Information

Why: Most endpoints require CMC exchange IDs, not names. The map endpoint translates human-readable slugs to IDs.

  1. Call /v1/exchange/map with slug=binance to get the exchange ID
  2. Call /v1/exchange/info with the ID to get full metadata

Compare Exchange Volumes

Why: Volume indicates liquidity and trustworthiness. Higher volume means better price execution and lower slippage.

  1. Call /v1/exchange/listings/latest to get all exchanges ranked by volume
  2. Use sort=volume_24h and sort_dir=desc for descending order

Analyze Trading Pairs

Why: Understanding available pairs helps users find where to trade specific assets and compare liquidity across venues.

  1. Get the exchange ID from /v1/exchange/map
  2. Call /v1/exchange/market-pairs/latest with that ID
  3. Filter by category=spot or category=derivatives as needed

Track Volume History

Why: Historical volume reveals trends. Declining volume may signal user exodus. Spikes may indicate wash trading or news events.

  1. Get the exchange ID from /v1/exchange/map
  2. Call /v1/exchange/quotes/historical with date range parameters

Query Parameters

Most endpoints accept these common parameters:

Parameter Type Description
id string CMC exchange ID (comma-separated for multiple)
slug string Exchange slug (e.g., "binance")
convert string Currency for price conversion (default: USD)
aux string Additional fields to include in response

Error Handling

All responses include a status object:

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

Common Error Codes

Code Meaning
0 Success
400 Bad request (invalid parameters)
401 Unauthorized (invalid API key)
403 Forbidden (plan limit exceeded)
429 Rate limit exceeded
500 Internal server error

Rate Limits

Rate limits depend on your subscription plan. Check the credit_count in responses to track API credit usage. The X-CMC_PRO_API_KEY header must be present on every request.

Response Format

All responses return JSON with this structure:

{
  "status": { },
  "data": { }
}

The data field contains either an object (single item) or array (multiple items) depending on the endpoint.

安全使用建议
This skill is an API reference for CoinMarketCap exchange endpoints and appears internally consistent. Before installing: (1) Plan how the agent will supply the X-CMC_PRO_API_KEY securely — do not paste your API key into free-text prompts; use the platform's secret store if available. (2) Be aware examples use curl so any executed commands including your API key could be captured in shell history or logs — prefer ephemeral execution or masked logging. (3) The skill permits Bash and Read; while the documentation doesn't instruct reading files, ensure the agent is not granted unnecessary file access if you want to keep local secrets private. (4) Check your CoinMarketCap plan and rate limits/credit usage to avoid unexpected charges.
功能分析
Type: OpenClaw Skill Name: cmc-api-exchange Version: 1.0.2 The skill is classified as suspicious due to the explicit allowance of the `Bash` tool in `SKILL.md`. While `Bash` is plausibly needed for the stated purpose of making `curl` API calls to CoinMarketCap, this capability introduces a significant remote code execution (RCE) vulnerability risk if the AI agent's command construction is not robustly sanitized against user input. There is no evidence of intentional malicious code, data exfiltration, or harmful prompt injection attempts within the provided files; all `curl` examples target the legitimate `https://pro-api.coinmarketcap.com` domain.
能力评估
Purpose & Capability
Name/description, the included reference files, and runtime instructions all describe CoinMarketCap exchange endpoints (map, info, listings, quotes, market-pairs, assets). Nothing in the skill requests unrelated services, binaries, or configuration.
Instruction Scope
The SKILL.md gives curl examples and explicitly requires the X-CMC_PRO_API_KEY header for API calls. The instructions do not ask the agent to read local files, environment variables, or send data to third-party endpoints beyond CoinMarketCap. Allowed-tools lists Bash and Read — Read could allow file reads in principle, but the skill's documented workflows do not instruct reading files or secrets from disk.
Install Mechanism
There is no install spec and no code files; this is instruction-only. That minimizes filesystem and network install risk.
Credentials
The skill requires an API key to use the CMC Pro endpoints (documented as X-CMC_PRO_API_KEY) but does not declare or require platform environment variables. This is proportionate to the stated purpose, though users must supply the key to the agent via the platform's secret handling or direct header insertion when executing curl.
Persistence & Privilege
always is false and the skill is user-invocable with normal autonomous invocation allowed. The skill does not request persistent system presence or modify other skills/configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cmc-api-exchange
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cmc-api-exchange 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Added homepage and source links to the skill metadata. - No changes to functional endpoints or workflows. - No impact on API usage or authentication.
v1.0.1
- Added a requires-credentials section specifying the need for a CoinMarketCap Pro API key. - Now explicitly lists how and where to provide the API key for authentication. - No changes to functionality or endpoints; documentation update only.
v1.0.0
- Initial release of the cmc-api-exchange skill. - Provides API reference and workflows for interacting with CoinMarketCap's exchange endpoints. - Supports queries for exchange info, trading pairs, volume data, historical metrics, and proof-of-reserves. - Includes sample workflows, query parameters, error handling, and response structures. - User-invocable with triggers such as "exchange API", "CMC exchange data", and "/cmc-api-exchange".
元数据
Slug cmc-api-exchange
版本 1.0.2
许可证
累计安装 1
当前安装数 1
历史版本数 3
常见问题

CoinMarketCap Exchange APIs 是什么?

API reference for CoinMarketCap exchange endpoints including exchange info, volume, market pairs, and assets. Use this skill whenever the user mentions excha... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 516 次。

如何安装 CoinMarketCap Exchange APIs?

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

CoinMarketCap Exchange APIs 是免费的吗?

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

CoinMarketCap Exchange APIs 支持哪些平台?

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

谁开发了 CoinMarketCap Exchange APIs?

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

💬 留言讨论