# CoinGecko Onchain DEX Token Price & Market Data (Base Network, Multi-Token)

> CoinGecko Onchain DEX Token Price & Market Data (Base Network, Multi-Token) is a paid API for AI agents from pro-api.coingecko.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-13).

Returns real-time onchain DEX price and market data for multiple token contract addresses on the Base network via CoinGecko's pro API.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x4200000000000000000000000000000000000006,0xacfe6019ed1a7dc6f7b508c02d1b04ec88cc21bf,0xa4a2e2ca3fbfe21aed83471d28b6f65a233c6e00,0x0086cff0c1e5d17b19f5bcd4c8840a5b4251d959,0x5f980dcfc4c0fa3911554cf5ab288ed0eb13dba3,0x16332535e2c27da578bc2e82beb09ce9d3c8eb07,0xc0634090f2fe6c6d75e61be2b949464abb498973,0x9f86db9fc6f7c9408e8fda3ff8ce4e78ac7a6b07,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x6b2504a03ca4d43d0d73776f6ad46dab2f2a4cfd,0xde61878b0b21ce395266c44d4d548d1c72a3eb07,0x7b0ee9dcb5c1d4d7cd630c652959951936512ba3
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coingecko-6e51283d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_72iK2fU0pQ6mIyWEnMpzY

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability coingecko-6e51283d
```

Example prompt: Can you pull the current onchain DEX prices, 24-hour volume, and market caps for these Base network tokens: 0x4200000000000000000000000000000000000006 and 0x940181a94a35a4569e4529a3cdfb74e38fd98631 using CoinGecko's pro API?

## When to prefer this

Use this endpoint when you need real-time onchain DEX prices (not centralized exchange prices) for multiple tokens simultaneously on the Base network, especially when you have contract addresses rather than coin IDs. Prefer this over CoinGecko's standard simple/price endpoint when you need DEX-sourced data or are working with tokens not listed on CEXes.

## Known failure modes

- Invalid or unrecognized contract address returns empty or null data for that token
- Network identifier mismatch causes 404 or empty result
- Rate limiting or missing API key returns 401/429
- Truncated or malformed contract address list causes a 400 bad request
- Token with no DEX liquidity on Base may return null price

## How this service works

Query onchain DEX token price & market data based on the provided token contract addresses on a network.

## Output

Returns a JSON object keyed by token contract address, each containing the current USD price sourced from onchain DEX data, and optionally 24hr volume, market cap, 24hr price change percentage, and total reserve in USD — all sourced from CoinGecko's onchain DEX aggregation on the Base network.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "include_24hr_vol": true,
   "include_market_cap": true,
   "include_24hr_price_change": true
  }
 },
 "output": {
  "type": "object",
  "example": {
   "0x4200000000000000000000000000000000000006": {
    "usd": 2500.5,
    "usd_24h_vol": 1500000,
    "usd_24h_change": 2.5,
    "usd_market_cap": 5000000000
   },
   "0x940181a94a35a4569e4529a3cdfb74e38fd98631": {
    "usd": 0.85,
    "usd_24h_vol": 250000,
    "usd_24h_change": -1.2,
    "usd_market_cap": 425000000
   }
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input",
  "output"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "include_24hr_vol": {
       "type": "boolean"
      },
      "mcap_fdv_fallback": {
       "type": "boolean"
      },
      "include_market_cap": {
       "type": "boolean"
      },
      "include_inactive_source": {
       "type": "boolean"
      },
      "include_24hr_price_change": {
       "type": "boolean"
      },
      "include_total_reserve_in_usd": {
       "type": "boolean"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coingecko-6e51283d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from pro-api.coingecko.com](https://www.zero.xyz/host/pro-api.coingecko.com/llms.txt)
