# CoinGecko Onchain DEX Token Price by Contract Address

> CoinGecko Onchain DEX Token Price by Contract Address is a paid API for AI agents from pro-api.coingecko.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-29).

Returns real-time on-chain DEX price and market data for one or more token contract addresses on a specified blockchain network.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/:network/token_price/:addresses?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/coingecko-onchain-dex-token-price-by-contract-address-af11609c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_H1LBxwRLcVTnWSduL3En0

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-onchain-dex-token-price-by-contract-address-af11609c
```

Example prompt: What's the current on-chain DEX price for the token at contract address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on the Ethereum network — and can you also pull the 24-hour volume and price change?

## When to prefer this

Prefer this endpoint when you need on-chain DEX-sourced price data for a specific token contract address rather than CoinGecko's centralized exchange aggregated prices. Ideal for DeFi applications, smart contract token price checks, or when you have a contract address but no CoinGecko coin ID. Best for Ethereum, Base, Solana, and other supported EVM/non-EVM networks where DEX liquidity is the primary price source.

## Known failure modes

- Invalid or unsupported network name returns an error or empty data
- Unknown or untraded contract address returns no price data
- Malformed contract address format causes a 400 or empty response
- Token with no recent DEX activity may return stale or null timestamps
- Rate limiting or payment failure returns a 402 or 429 error
- Requesting too many addresses at once may result in partial or truncated results

## How this service works

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

## Output

Returns a structured data object keyed by token contract address containing: current USD token price, optional 24-hour trading volume, optional market cap, optional 24-hour price change percentage, optional total reserve in USD, and optional last trade timestamp — all sourced from on-chain DEX activity.

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "network",
      "addresses"
     ],
     "properties": {
      "network": {
       "type": "string"
      },
      "addresses": {
       "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",
     "required": [
      "data"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "id",
        "type",
        "attributes"
       ],
       "properties": {
        "id": {
         "type": "string"
        },
        "type": {
         "type": "string"
        },
        "attributes": {
         "type": "object",
         "required": [
          "token_prices"
         ],
         "properties": {
          "token_prices": {
           "type": "object",
           "additionalProperties": {
            "type": "string"
           }
          },
          "h24_volume_usd": {
           "type": "object",
           "additionalProperties": {
            "type": "string"
           }
          },
          "market_cap_usd": {
           "type": "object",
           "additionalProperties": {
            "type": "string"
           }
          },
          "last_trade_timestamp": {
           "type": "object",
           "additionalProperties": {
            "type": "integer"
           }
          },
          "total_reserve_in_usd": {
           "type": "object",
           "additionalProperties": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/coingecko-onchain-dex-token-price-by-contract-address-af11609c/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)
