← Back to Skills Marketplace
bryan-cmc

CoinMarketCap Onchain Data APIs

by CoinMarketCap · GitHub ↗ · v1.0.1
cross-platform ✓ Security Clean
438
Downloads
1
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install cmc-api-onchain-data
Description
API reference for CoinMarketCap DEX endpoints including token lookup, pools, transactions, trending, and security analysis. Use this skill whenever the user...
README (SKILL.md)

CoinMarketCap DEX API

This skill covers CoinMarketCap's DEX (Decentralized Exchange) APIs for on-chain token data. Unlike CEX endpoints, these APIs fetch data directly from blockchain DEXs like Uniswap, PancakeSwap, and Raydium.

Authentication

All requests require an API key in the header:

curl -X GET "https://pro-api.coinmarketcap.com/v1/dex/platform/list" \
  -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

POST vs GET Endpoints

Many DEX endpoints use POST for complex queries with body parameters. Always check the method:

  1. GET endpoints pass parameters as query strings
  2. POST endpoints pass parameters in JSON body with Content-Type: application/json

Common Use Cases

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

  1. Get DEX token price by contract address
  2. Find a token's contract address by name
  3. Get prices for multiple tokens at once
  4. Check token security before trading
  5. Find liquidity pools for a token
  6. Find trending DEX tokens
  7. Find today's biggest DEX gainers
  8. Find newly launched tokens
  9. Detect potential rug pulls (liquidity removal)
  10. Get recent trades for a token
  11. Get supported networks and DEXs
  12. Get meme coins

API Overview

Endpoint Method Description Reference
/v1/dex/token GET Token details by platform/address tokens.md
/v1/dex/token/price GET Latest DEX price for a token tokens.md
/v1/dex/token/price/batch POST Batch token prices tokens.md
/v1/dex/token/pools GET Liquidity pools for a token tokens.md
/v1/dex/token-liquidity/query GET Token liquidity over time tokens.md
/v1/dex/tokens/batch-query POST Batch token metadata tokens.md
/v1/dex/tokens/transactions GET Recent DEX transactions tokens.md
/v1/dex/tokens/trending/list POST Trending DEX tokens tokens.md
/v4/dex/pairs/quotes/latest GET Latest DEX pair quotes pairs.md
/v4/dex/spot-pairs/latest GET DEX spot pairs listing pairs.md
/v1/dex/platform/list GET List supported DEX platforms platforms.md
/v1/dex/platform/detail GET Platform details platforms.md
/v1/dex/search GET Search DEX tokens/pairs platforms.md
/v1/dex/gainer-loser/list POST Top DEX gainers/losers discovery.md
/v1/dex/liquidity-change/list GET Tokens with liquidity changes discovery.md
/v1/dex/meme/list POST Meme tokens on DEX discovery.md
/v1/dex/new/list POST Newly discovered DEX tokens discovery.md
/v1/dex/security/detail GET Token security/risk signals security.md

Common Workflows

Get DEX Token Information

  1. Search for token: /v1/dex/search?keyword=PEPE
  2. Get token details: /v1/dex/token?network_slug=ethereum&contract_address=0x...
  3. Check security risks: /v1/dex/security/detail?network_slug=ethereum&contract_address=0x...

Analyze Token Liquidity

  1. Get token pools: /v1/dex/token/pools?network_slug=ethereum&contract_address=0x...
  2. Get liquidity history: /v1/dex/token-liquidity/query?network_slug=ethereum&contract_address=0x...

Find Trending Tokens

  1. Get trending tokens: POST /v1/dex/tokens/trending/list with filters
  2. Get gainers/losers: POST /v1/dex/gainer-loser/list
  3. Find new tokens: POST /v1/dex/new/list

Monitor DEX Activity

  1. Get recent transactions: /v1/dex/tokens/transactions?network_slug=ethereum&contract_address=0x...
  2. Get pair quotes: /v4/dex/pairs/quotes/latest?network_slug=ethereum&contract_address=0x...

Key Parameters

Most DEX endpoints require:

  1. network_slug or platform_crypto_id: Identifies the blockchain (ethereum, solana, bsc)
  2. contract_address: The token's on-chain contract address

Use /v1/dex/platform/list to get valid network slugs and platform IDs.

Error Handling

Code Meaning
400 Bad request (invalid parameters)
401 Unauthorized (invalid or missing API key)
403 Forbidden (endpoint not in your plan)
429 Rate limit exceeded
500 Server error

Example error response:

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

Rate Limits

Rate limits depend on your API plan. Check response headers:

  1. X-CMC_PRO_API_KEY_CREDITS_REMAINING: Credits left
  2. X-CMC_PRO_API_KEY_CREDITS_RESET: Reset timestamp

Response Format

All responses follow this structure:

{
  "status": {
    "timestamp": "2024-01-15T12:00:00.000Z",
    "error_code": 0,
    "error_message": null
  },
  "data": { ... }
}
Usage Guidance
This skill is a documentation/reference pack for CoinMarketCap DEX APIs and appears internally consistent. Before installing: (1) plan to supply your CoinMarketCap API key securely (the docs use X-CMC_PRO_API_KEY but the registry metadata does not declare a primary credential); put the key into your agent's secret storage rather than pasting it into chat. (2) Note that allowed tools include Bash/Read — the examples run curl to pro-api.coinmarketcap.com; avoid giving the agent other sensitive values (wallet private keys, other API keys, or local file contents) when invoking this skill. (3) Confirm you trust the source (no homepage/source provided here) before sharing your API key. If you want tighter control, require user invocation only and do not allow autonomous invocation for this skill in your agent settings.
Capability Analysis
Type: OpenClaw Skill Name: cmc-api-onchain-data Version: 1.0.1 This skill bundle is an API reference for CoinMarketCap DEX endpoints, consisting entirely of markdown documentation and metadata. While it declares `Bash` as an allowed tool, this is plausibly needed for an AI agent to demonstrate or execute the `curl` examples provided for interacting with the legitimate CoinMarketCap API. There is no evidence of intentional harmful behavior, data exfiltration, persistence mechanisms, or prompt injection attempts designed to subvert the agent or perform unauthorized actions within the skill's content (SKILL.md, references/*.md).
Capability Assessment
Purpose & Capability
The name/description and the provided reference files all describe CoinMarketCap DEX/on-chain APIs and the listed endpoints. There are no unexpected binaries, installs, or unrelated credential requests.
Instruction Scope
SKILL.md is an API reference with curl examples and workflows that stay within the scope of querying CMC DEX endpoints (pro-api.coinmarketcap.com). It does not instruct reading arbitrary local files or sending data to third-party endpoints outside the documented API.
Install Mechanism
Instruction-only skill with no install spec and no code files — nothing is written to disk or downloaded.
Credentials
The documentation shows every request requires an X-CMC_PRO_API_KEY header (i.e., an API key). The registry metadata lists no required environment variables or primary credential. This is not a functional contradiction (the key can be provided at runtime), but it's a minor omission: the skill should declare that a CoinMarketCap API key is the primary credential so users know to supply it securely.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modify other skills or system configuration. Allowed-tools includes Bash/Read, which is reasonable for curl examples; the skill itself does not instruct privileged actions.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install cmc-api-onchain-data
  3. After installation, invoke the skill by name or use /cmc-api-onchain-data
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
- Update display name
Metadata
Slug cmc-api-onchain-data
Version 1.0.1
License
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is CoinMarketCap Onchain Data APIs?

API reference for CoinMarketCap DEX endpoints including token lookup, pools, transactions, trending, and security analysis. Use this skill whenever the user... It is an AI Agent Skill for Claude Code / OpenClaw, with 438 downloads so far.

How do I install CoinMarketCap Onchain Data APIs?

Run "/install cmc-api-onchain-data" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is CoinMarketCap Onchain Data APIs free?

Yes, CoinMarketCap Onchain Data APIs is completely free (open-source). You can download, install and use it at no cost.

Which platforms does CoinMarketCap Onchain Data APIs support?

CoinMarketCap Onchain Data APIs is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created CoinMarketCap Onchain Data APIs?

It is built and maintained by CoinMarketCap (@bryan-cmc); the current version is v1.0.1.

💬 Comments