TopRank Skills

Official OpenClaw rules 54%

cmc-x402

Access CoinMarketCap data via x402 pay-per-request protocol with USDC payments on Base. Use when users mention x402, want CMC data without API keys, ask about pay-per-request APIs, or need to integrate CMC with on-chain payments. Also use for any Coinbase x402 protocol questions. Trigger: "x402", "pay per request", "no API key", "USDC payment", "CMC without subscription", "/cmc-x402"

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 cmc-x402 技能。 若已安装,则直接安装 cmc-x402 技能。

Overview

Skill Key
bryan-cmc/cmc-x402
Author
bryan-cmc
Source Repo
openclaw/skills
Version
-
Source Path
skills/bryan-cmc/cmc-x402
Latest Commit SHA
c30b62e41d2050d2a586483467ce01171fe70d99

Extracted Content

SKILL.md excerpt

# 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:

```bash
npm install @x402/axios @x402/evm viem
```

Fetch data with automatic payment:

```typescript
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";

// SECURIT...

Related Claw Skills