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
Make Request
Make a request to the x402-enabled endpoint. The server returns payment requirements with a 402 response.
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.
Supported Endpoints
| Endpoints | Description & Endpoint Path |
|---|---|
| Onchain: Simple Token Price | To 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 Network | To query the latest trending pools & tokens based on a provided network./x402/onchain/networks/{id}/trending_pools |
| Onchain: Token Data by Token Address | To 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 Price | To get token price & market data of coins listed on CoinGecko.com, via symbol or unique coin IDs./x402/simple/priceGet 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.
-
Example 1: Get VIRTUALS and WETH tokens data on Base network:
-
Example 2: Search tokens and pools data on Solana network, with name, symbol, or contract address:
-
Example 3: Get the top trending tokens and pools data on Base network, in the last 5 minutes:
-
Example 4: Get KEETA price, liquidity, market data and more on Base network:
-
Example 5: Get USD price & market data of Bitcoin, Ethereum and Solana, by symbols:
Pricing & Payment Method
Current price: $0.01 USDC per API request, for all endpoints stated above. Each search request is charged on a pay-per-use basis using cryptocurrency through the payment header system. Network supported:- Base
- Solana


