# CoinGecko Onchain Token Price – Avalanche (AVAX)

> CoinGecko Onchain Token Price – Avalanche (AVAX) 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 onchain DEX price and market data for a token contract address on the Avalanche network

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/avax/token_price/:address
- 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-870578e7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pkKfuQfDjD1w43pvgppyx

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-870578e7
```

Example prompt: What's the current onchain DEX price, 24-hour volume, and market cap for the Avalanche token at contract address 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E on CoinGecko?

## When to prefer this

Use this endpoint when you specifically need onchain DEX-sourced price data for a token on the Avalanche (AVAX) network identified by its contract address, rather than a CoinGecko coin ID. Prefer this over the standard simple/price endpoint when the token may not be listed on CoinGecko's centralized index but trades on Avalanche DEXes.

## Known failure modes

- Invalid or unrecognized contract address returns empty or null price data
- Contract address not indexed on Avalanche returns 404 or empty response
- Malformed address format causes 400 bad request
- Token with very low liquidity may return null for market cap or volume
- Rate limiting or payment failure returns 402 or 429 error
- Network outage or CoinGecko API downtime returns 500 error

## 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 with onchain DEX price data for the specified token contract on Avalanche, optionally including 24hr volume, market cap, 24hr price change, total reserve in USD, and inactive source data — sourced directly from DEX liquidity pools.

## 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-870578e7/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)
