cmc-x402

cmc-x402 is a skill for Claude Code from OpenCMC/skills-for-ai-agents-by-CoinMarketCap. It costs 99 tokens per session (1,142 once invoked), scanned A, original, MIT.

A way to request CoinMarketCap cryptocurrency data by automatically paying for each request with USDC, a dollar-linked cryptocurrency, on Base, a blockchain network.

In plain words
What is it for?
Use it to retrieve coin prices, ranked cryptocurrency lists, or DEX token searches from CoinMarketCap through pay-per-request HTTP calls.
Why use it?
It removes the need for an API key or subscription, but requires a Base wallet, USDC for requests, and ETH for transaction fees.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: positional $N argument.

Good fit Use it to retrieve coin prices, ranked cryptocurrency lists, or DEX token searches from CoinMarketCap through pay-per-request HTTP calls.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add OpenCMC/skills-for-ai-agents-by-CoinMarketCap --skill cmc-x402
Clone the repo
git clone --depth 1 https://github.com/OpenCMC/skills-for-ai-agents-by-CoinMarketCap

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cmc-x402

README.md
[![agentmods](https://agentmods.dev/badge/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402/github.svg)](https://agentmods.dev/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402)
Your own site
<a href="https://agentmods.dev/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402"><img src="https://agentmods.dev/badge/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cmc-x402

Your own site · 80×15
<a href="https://agentmods.dev/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402"><img src="https://agentmods.dev/badge/skills/opencmc/skills-for-ai-agents-by-coinmarketcap/cmc-x402.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 99 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,142 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00099 $0.01142
Opus 5 $0.00049 $0.00571
Sonnet 5 $0.00020 $0.00228
Haiku 4.5 $0.00010 $0.00114

Measured 12d ago against content hash e65932aaf601, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cmc-x402 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cmc-x402/SKILL.md · 130 lines

How it starts

The opening of the file, as written. The whole thing — 130 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CoinMarketCap x402

Pay-per-request crypto market data powered by the x402 protocol. Access CoinMarketCap endpoints instantly with on-chain USDC payment. No API key or subscription required.

What is x402?

x402 is an open payment protocol developed by Coinbase that enables automatic stablecoin payments over HTTP. Instead of managing API keys, you pay $0.01 USDC per request on Base. The x402 client library handles payment signing automatically.

Learn more: https://docs.x402.org

Prerequisites

Before using x402 endpoints, ensure you have:

  1. Node.js 18+ and npm installed
  2. Base network wallet with a private key you control
  3. USDC on Base to pay for requests ($0.01 per request)
  4. Small amount of ETH on Base for gas fees

Use Cases

Get current prices for specific coins: Use /x402/v3/cryptocurrency/quotes/latest with symbol or id parameter. Example: Get BTC and ETH prices for a portfolio tracker.

List top cryptocurrencies: Use /x402/v3/cryptocurrency/listing/latest with limit parameter. Example: Display top 100 coins ranked by market cap.

Search for DEX tokens: Use /x402/v1/dex/search with keyword parameter. Example: Find a memecoin by name when you don't know the contract address.

Get DEX pair trading data: Use /x402/v4/dex/pairs/quotes/latest with pair address. Example: Monitor liquidity and volume for a specific Uniswap pool.

AI agent data access: Use the MCP endpoint at https://mcp.coinmarketcap.com/x402/mcp. Example: Let Claude or other LLMs fetch live crypto data with automatic payment.

Quick Start

Install the x402 TypeScript SDK:

npm install @x402/axios @x402/evm viem

Fetch data with automatic payment:

import { createX402AxiosClient } from "@x402/axios";
import { ExactEvmScheme, toClientEvmSigner } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
import { createPublicClient, http } from "viem";
import { base } from "viem/chains";

// SECURITY: Never hardcode private keys in source code.
// Use environment variables: process.env.PRIVATE_KEY
// For production, use a dedicated hot wallet with limited funds.
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);
const publicClient = createPublicClient({ chain: base, transport: http() });
const signer = toClientEvmSigner(account, publicClient);

const client = createX402AxiosClient({
  schemes: [new ExactEvmScheme(signer)],
});

const response = await client.get(
  "https://pro.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest",
  { params: { symbol: "BTC,ETH" } }
);

console.log(response.data);

Read the full file on GitHub · 130 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 130 lines · 99 tokens per session scan A e65932aaf601

Subscribe to this mod's changes

cmc-x402 is a skill published in the GitHub repository OpenCMC/skills-for-ai-agents-by-CoinMarketCap (67 stars, last pushed 6mo ago), licensed MIT. It adds 99 tokens to every session and 1,142 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.