# CoinGecko Onchain Token Price (Base Network)

> CoinGecko Onchain Token Price (Base Network) 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-15).

Returns real-time DEX token price and market data for a given token contract address on the Base network via CoinGecko's onchain data.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/:address
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pro-api-coingecko-com-56539f21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_88rLda5NfB0FZgPKpzdwH

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 pro-api-coingecko-com-56539f21
```

Example prompt: What's the current onchain price, 24-hour volume, and market cap for the token at contract address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on the Base network using CoinGecko?

## When to prefer this

Use this endpoint when you need live onchain DEX-sourced token prices on the Base network by contract address, especially for tokens that may not be listed on centralized exchanges. Prefer this over CoinGecko's standard coin price endpoint when you have a contract address rather than a coin ID, or when you need DEX-level granularity like reserve data.

## Known failure modes

- Invalid or unrecognized contract address returns empty or null price data
- Token not indexed by CoinGecko onchain data returns 404 or empty result
- Rate limit exceeded returns 429 Too Many Requests
- Missing required address path parameter returns 400 Bad Request
- Network outage or CoinGecko API downtime returns 503

## 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 containing the token's current USD price fetched from onchain DEX data on Base, along with optional fields such as 24-hour trading volume, market capitalization, 24-hour price change percentage, and total reserve in USD — all sourced from CoinGecko's onchain data index.

## 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/pro-api-coingecko-com-56539f21/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)
