Power AI Agents with
Crypto Data via x402

Instant pay-per-request access to CoinMarketCap crypto data via x402. No API keys or subscriptions.

Explore Docs
Terminal
$ curl -i "https://pro-api.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest?id=1"

HTTP/2 402 PAYMENT REQUIRED
payment-required: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3I... 

# base64 decode -> payment JSON
# pay, then send PAYMENT-SIGNATURE

{
  "error": "Payment required", 
  "resource": "/x402/v3/cryptocurrency/quotes/latest", 
  "accepts": [ { scheme: "exact", amount: "0.01" } ]
}

This feature is currently in beta and may be subject to change.

Trusted by Leading Companies

CoinbaseCoinbase
BinanceBinance
KrakenKraken
Blockchain.comBlockchain.com
Crypto.comCrypto.com

How It Works

Three simple steps to access crypto data with x402, including full 402 response details

STEP 01

First Request (Get 402 Challenge)

Call once to get HTTP 402 and a base64 payment-required header. Decode it for payment terms.

curl -i "https://pro-api.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest?id=1"
    
< HTTP/2 402
< payment-required: eyJ4NDAyVmVyc2lvbiI6MiwiZXJyb3IiOiJQYXltZW50IHJlcXVpcmVkIiwicmVzb3VyY2UiOnsidXJsIjoiL3g0MDIvdjMvY3J5cHRvY3VycmVuY3kvcXVvdGVzL2xhdGVzdCIsImRlc2NyaXB0aW9uIjoiY21jIGNyeXB0byBxdW90ZSBsYXRlc3QgZGF0YSBhcGkifSwiYWNjZXB0cyI6W3sic2NoZW1lIjoiZXhhY3QiLCJuZXR3b3JrIjoiZWlwMTU1Ojg0NTMiLCJhc3NldCI6IjB4ODMzNTg5ZkNENmVEYjZFMDhmNGM3QzMyRDRmNzFiNTRiZEEwMjkxMyIsImFtb3VudCI6IjEwMDAwIiwicGF5VG8iOiIweDI3MTE4OWM4NjBEQjI1YkM0MzE3M0IwMzM1Nzg0YUQ2OGE2ODA5MDgiLCJtYXhUaW1lb3V0U2Vjb25kcyI6MzAsImV4dHJhIjp7Im5hbWUiOiJVU0QgQ29pbiIsInZlcnNpb24iOiIyIiwieDQwMlBheW1lbnRDb25maWdJZCI6IjY5OWRiYWI3OWYzMmZmZGU2NTAxMDRhYSJ9fV19

< {
  "x402Version": 2,
  "error": "Payment required",
  "resource": {
    "url": "/x402/v3/cryptocurrency/quotes/latest",
    "description": "cmc crypto quote latest data api"
  },
  "accepts": [...]
}
STEP 02

Second Request (Attach Payment Signature)

Sign the payment according to the returned challenge, then resend the same request with PAYMENT-SIGNATURE header. This proves authorization for the required USDC amount.

curl -i "https://pro-api.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest?id=1" \
  -H "PAYMENT-SIGNATURE: eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9..."

// Required payment terms are returned in Step 01
// network: eip155:8453 (Base)
// asset: USDC
// amount: 0.01 (smallest unit)
STEP 03

Receive 200 Response Data

After signature verification succeeds, the API immediately returns HTTP 200 with the requested market data payload.

< HTTP/2 200
< {
  "status": {
    "error_code": 0,
    "error_message": null
  },
  "data": {
    "1": {...}
  }
}

Frequently Asked Questions (FAQ)

Everything you need to know about x402 on CoinMarketCap

x402 is an open protocol developed by Coinbase that enables automatic stablecoin payments over HTTP. It allows clients to pay for individual API requests using USDC, without API keys, subscriptions, or accounts.
Each request currently costs $0.01 USDC. Pricing may vary by endpoint and is subject to change. Always check the payment requirements returned in the 402 Payment Required response.
CoinMarketCap currently supports USDC payments on Base. Additional chains and tokens may be added in the future.
No. x402 removes the need for accounts, API keys, or authentication tokens. Payment authorization serves as access control.
No. You can use any compatible wallet or x402 client that handles signing and payment authorization securely. Private keys remain in your wallet and are never shared with CoinMarketCap.
1. Set up an x402 client using the official quickstart. 2. Fund your wallet with USDC on Base or Solana. 3. Send requests to the CoinMarketCap x402-enabled endpoints. Your wallet will automatically authorize and attach payment headers.
The server will respond with an HTTP 402 Payment Required status, including pricing details and instructions for completing the payment.
Access is granted immediately after payment authorization is verified. The same request is processed and returns the requested data with no additional steps.
Yes. x402 is designed specifically for programmatic access. AI agents and backend systems can automatically authorize payments and retrieve data without human intervention.
Yes. Most wallets and x402 clients allow you to configure spending limits or approval policies to control total spend and prevent unexpected usage.
Payments are final once authorized and processed. Since payment is tied to successful data delivery, refunds are generally not provided.
Yes. Reasonable rate limits may apply to ensure system stability and fairness. These limits may vary by endpoint and usage pattern.
Traditional APIs require accounts, API keys, and subscription management. x402 replaces this with per-request cryptographic payment, allowing instant access without onboarding friction.
Yes. CoinMarketCap continues to support its existing API key–based access model. x402 is an additional option designed for pay-per-use and agent-driven access.
x402 is ideal for: AI agents and autonomous systems, developers who want instant access without account setup, applications with variable or unpredictable usage, prototyping and on-demand workloads, and systems that prefer usage-based pricing over subscriptions.

Ready to Get Started?

Set up your x402 client, fund your wallet with USDC, and start accessing CoinMarketCap data in minutes.

This feature is currently in beta and may be subject to change.