Skip to main content
These are experimental endpoints. Its features, pricing, and availability are subject to change without prior notice. For production systems, we strongly advise using the stable, standard subscription endpoints.If you have any questions or feedbacks, please share with us here.

x402 Overview

x402 is a new open payment protocol developed by Coinbase that enables instant, automatic stablecoin payments directly over HTTP. Learn more about x402 here.

How It Works

1

Make Request

Make a request to the x402-enabled endpoint. The server returns payment requirements with a 402 response.
2

Sign

Your wallet signs a USDC authorization for the requested amount.
3

Pay & Get Data

Send the signed payment header and receive the data you requested.
AuthenticationTo access CoinGecko API with x402, you can follow the simple steps below:
  • Set up an x402 client with following the official x402 Quickstart for Buyers
  • Use the x402 Path: Call any supported endpoint by inserting /x402/ immediately after the version segment (/v3/) in the URL path.
Reminder
  • Do not send x-cg-pro-api-key or x-cg-demo-api-key, as API key is not required.
  • Root URL for the endpoints: All x402 requests must use the base path:
    pro-api.coingecko.com/api/v3/x402/...

Supported Endpoints

EndpointsDescription & Endpoint Path
Onchain: Simple Token PriceTo get token price & market data based on the provided token contract addresses on a network.

/x402/onchain/simple/networks/{id}/token_price/{address}
Onchain: Search Pools To search pools and token, by contract address, name or token symbol.

/x402/onchain/search/pools
Onchain: Trending Pools by NetworkTo query the latest trending pools & tokens based on a provided network.

/x402/onchain/networks/{id}/trending_pools
Onchain: Token Data by Token AddressTo query the latest price, liquidity, and market data of a token, based on the provided token contract address on a network

/x402/onchain/networks/eth/tokens/{address}
CoinGecko: Simple PriceTo get token price & market data of coins listed on CoinGecko.com, via symbol or unique coin IDs.

/x402/simple/price

Get full list of coins IDs via CSV, or GSheet.
  • All parameters from the CoinGecko Pro API endpoints are supported. For the complete list of available parameters, features, limits, and payload data, please refer to the Pro API References of respective endpoints.
  • For Onchain endpoint requests that require network_id, you may check for the full list of network IDs via CSV or GSheet. We cover more than 250 networks, the widest coverage in industry!
  • If you wish to learn more details about how to use CoinGecko API x402 endpoints, please visit this guide.
Request URL Examples:
  • Example 1: Get VIRTUALS and WETH tokens data on Base network:
    GET /api/v3/x402/onchain/simple/networks/base/token_price/0x0b3e328455c4059eeb9e3f84b5543f74e24e7e1b,0x4200000000000000000000000000000000000006
      ?include_market_cap=true
      &mcap_fdv_fallback=true
      &include_24hr_vol=true
      &include_24hr_price_change=true
      &include_total_reserve_in_usd=true
    
  • Example 2: Search tokens and pools data on Solana network, with name, symbol, or contract address:
    GET /api/v3/x402/onchain/search/pools
      ?query=pump
      &network=solana
      &include=base_token,quote_token,dex
      &page=1
    
  • Example 3: Get the top trending tokens and pools data on Base network, in the last 5 minutes:
    GET /api/v3/x402/onchain/networks/base/trending_pools
      ?page=1
      &duration=5m
      &include_gt_community_data=true
      &include=base_token,quote_tokens,dex
    
  • Example 4: Get KEETA price, liquidity, market data and more on Base network:
    GET /api/v3/x402/onchain/networks/base/tokens/0xc0634090f2fe6c6d75e61be2b949464abb498973
      ?include=top_pools
      &include_composition=true
    
  • Example 5: Get USD price & market data of Bitcoin, Ethereum and Solana, by symbols:
    GET /api/v3/x402/simple/price
      ?vs_currencies=usd
      &symbols=btc,eth,sol
      &include_tokens=top
      &include_market_cap=true
      &include_24hr_vol=true
      &include_24hr_change=true
      &include_last_updated_at=true
      &precision=full
    

Pricing & Payment Method

Current price: $0.01 USDC per API request, for all endpoints stated above.
Pricing Notice: The current pricing of $0.01 USDC per request is subject to change at any time without prior notice. Please check the latest pricing when generating your payment header.
Each search request is charged on a pay-per-use basis using cryptocurrency through the payment header system. Network supported:
  • Base
  • Solana

Request Example

curl --request GET \
  --url 'https://pro-api.coingecko.com/api/v3/x402/onchain/networks/eth/tokens/0xdac17f958d2ee523a2206206994597c13d831ec7?include_composition=true' \
  -H 'PAYMENT-SIGNATURE: {{paymentSignature}}' \

Response Example

Please refer to the respective endpoint documentations for full parameters and payload supports.
{
  "data": {
    "id": "eth_0xdac17f958d2ee523a2206206994597c13d831ec7",
    "type": "token",
    "attributes": {
      "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "name": "Tether USD",
      "symbol": "USDT",
      "decimals": 6,
      "image_url": "https://coin-images.coingecko.com/coins/images/325/large/Tether.png?1696501661",
      "coingecko_coin_id": "tether",
      "total_supply": "91775654692250534.0",
      "normalized_total_supply": "91775654692.2505",
      "price_usd": "0.999188255",
      "fdv_usd": "91700939859.6687",
      "total_reserve_in_usd": "405089394.14192413773442554227",
      "volume_usd": {
        "h24": "1142454033.37436"
      },
      "market_cap_usd": "171798403974.784"
    },
    "relationships": {
      "top_pools": {
        "data": [
          {
            "id": "eth_0x667701e51b4d1ca244f17c78f7ab8744b4c99f9b",
            "type": "pool"
          },
          {
            "id": "eth_0xf063bd202e45d6b2843102cb4ece339026645d4a",
            "type": "pool"
          },
          {
            "id": "eth_0x8aa4e11cbdf30eedc92100f4c8a31ff748e201d44712cc8c90d189edaa8e4e47",
            "type": "pool"
          }
        ]
      }
    }
  },
  "included": [
    {
      "id": "eth_0x667701e51b4d1ca244f17c78f7ab8744b4c99f9b",
      "type": "pool",
      "attributes": {
        "base_token_price_usd": "0.999949947925521",
        "base_token_price_native_currency": "0.000223341206041575",
        "base_token_balance": "74198606.301554",
        "base_token_liquidity_usd": "74194892.50738515",
        "quote_token_price_usd": "0.99918825500163",
        "quote_token_price_native_currency": "0.000223171080110164",
        "quote_token_balance": "29771050.29628",
        "quote_token_liquidity_usd": "29746883.795105774",
        "base_token_price_quote_token": "1.0007623117",
        "quote_token_price_base_token": "0.9992382689",
        "address": "0x667701e51b4d1ca244f17c78f7ab8744b4c99f9b",
        "name": "USDC / USDT",
        "pool_created_at": "2025-09-18T08:28:30Z",
        "token_price_usd": "0.99918825500163",
        "fdv_usd": "91700939859.6687",
        "market_cap_usd": "171798403975.064",
        "price_change_percentage": {
          "m5": "-0.02",
          "m15": "-0.65",
          "m30": "-0.01",
          "h1": "0",
          "h6": "-0.18",
          "h24": "-0.5"
        },
        "transactions": {
          "m5": {
            "buys": 0,
            "sells": 2,
            "buyers": 0,
            "sellers": 2
          },
          "m15": {
            "buys": 4,
            "sells": 7,
            "buyers": 3,
            "sellers": 5
          },
          "m30": {
            "buys": 12,
            "sells": 19,
            "buyers": 7,
            "sellers": 9
          },
          "h1": {
            "buys": 39,
            "sells": 48,
            "buyers": 16,
            "sellers": 15
          },
          "h6": {
            "buys": 180,
            "sells": 271,
            "buyers": 31,
            "sellers": 35
          },
          "h24": {
            "buys": 870,
            "sells": 1109,
            "buyers": 55,
            "sellers": 59
          }
        },
        "volume_usd": {
          "m5": "988.7572917698",
          "m15": "1857835.95996426",
          "m30": "3190909.49729904",
          "h1": "9434171.29930675",
          "h6": "84784863.3965608",
          "h24": "388004708.962186"
        },
        "reserve_in_usd": "103939687.035"
      },
      "relationships": {
        "base_token": {
          "data": {
            "id": "eth_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "type": "token"
          }
        },
        "quote_token": {
          "data": {
            "id": "eth_0xdac17f958d2ee523a2206206994597c13d831ec7",
            "type": "token"
          }
        },
        "dex": {
          "data": {
            "id": "fluid-ethereum",
            "type": "dex"
          }
        }
      }
    }
  ]
}