# CoinGecko Onchain DEX Token Price (Base Network, Multi-Address)

> CoinGecko Onchain DEX Token Price (Base Network, Multi-Address) 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 on-chain DEX price and market data for multiple token contract addresses on the Base network.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x4200000000000000000000000000000000000006,0x940181a94a35a4569e4529a3cdfb74e38fd98631,0x9b5e262cf9bb04869ab40b19af91d2dc85761722
- 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-f25f073c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dtNyJVGAyx15fEwd3gyb2

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-f25f073c
```

Example prompt: Can you pull the current on-chain DEX prices and 24-hour price changes for WETH (0x4200000000000000000000000000000000000006), Aerodrome (0x940181a94a35a4569e4529a3cdfb74e38fd98631), and 0x9b5e262cf9bb04869ab40b19af91d2dc85761722 on the Base network using CoinGecko?

## When to prefer this

Use this endpoint when you need real-time on-chain DEX price data for specific token contract addresses on the Base network, especially when you want to query multiple tokens in a single call. Prefer this over CoinGecko's off-chain coin price endpoint when you need DEX-sourced pricing or when you have contract addresses rather than CoinGecko coin IDs.

## Known failure modes

- Invalid or unsupported contract address returns empty or missing data for that token
- Network not supported returns 404 or empty response
- Exceeds rate limit or payment not processed returns 402 or 429
- Malformed contract address format causes 400 bad request
- Token has no on-chain liquidity data returns null price fields

## 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 on-chain DEX data, and optionally 24hr volume, market cap, 24hr price change, and total reserve in USD depending on query flags.

## 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
   },
   "0x940181a94a35a4569e4529a3cdfb74e38fd98631": {
    "usd": 0.85
   },
   "0x9b5e262cf9bb04869ab40b19af91d2dc85761722": {
    "usd": 1.2
   }
  }
 }
}
```

## 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-f25f073c/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)
