# CoinGecko Pro Onchain Token Price - Base Network (0x0004a2c7)

> CoinGecko Pro Onchain Token Price - Base Network (0x0004a2c7) is a paid API for AI agents from pro-api.coingecko.com, paid per call via x402, $0.010000/call, status unknown (last checked 2026-09-15).

Returns onchain DEX price and market data for a specific token contract (0x0004a2c7a40d97add19a428dae3fab4654c0c4a8) on the Base network via CoinGecko's GeckoTerminal data.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x0004a2c7a40d97add19a428dae3fab4654c0c4a8
- Price: $0.010000/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-df8dbec7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_U_q1xXKQ0NXRC43H-f6CS

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

Example prompt: What's the current onchain price and 24-hour volume for the token at contract address 0x0004a2c7a40d97add19a428dae3fab4654c0c4a8 on the Base network? Include market cap and price change too.

## When to prefer this

Use this endpoint when you specifically need onchain DEX-sourced price data for this exact token contract on the Base network, rather than CEX prices. Ideal for DeFi applications, portfolio trackers, or agents monitoring Base-native tokens that may not be listed on centralized exchanges. Prefer this over the generic simple/price endpoint when you need DEX liquidity-based pricing or reserve data.

## Known failure modes

- Token contract address not found on Base network — returns empty data or 404
- Invalid or inactive token contract returns no price data
- Network identifier mismatch causes no results
- Rate limit or authentication failure returns 401/429
- Token has insufficient liquidity on DEX — price may be stale or unavailable

## 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 sourced from onchain DEX liquidity pools on Base, along with optional fields: 24hr trading volume, market cap, 24hr price change percentage, and total reserve in USD — all indexed by the contract address.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "include_24hr_vol": true,
   "mcap_fdv_fallback": true,
   "include_market_cap": true,
   "include_inactive_source": true,
   "include_24hr_price_change": true,
   "include_total_reserve_in_usd": true
  }
 },
 "output": {
  "type": "object",
  "example": {
   "data": {
    "id": "token-price-query",
    "type": "simple_token_price",
    "attributes": {
     "token_prices": {
      "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8": {
       "price_usd": 0.00125,
       "market_cap_usd": 5000000,
       "volume_usd_24h": 250000,
       "total_reserve_in_usd": 1000000,
       "price_change_percentage_24h": 2.5
      }
     }
    }
   }
  }
 }
}
```

## 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"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "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",
      "h24_volume_usd",
      "market_cap_usd",
      "h24_price_change_percentage"
     ],
     "properties": {
      "token_prices": {
       "type": "object",
       "required": [
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8"
       ],
       "properties": {
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8": {
         "type": "null"
        }
       }
      },
      "h24_volume_usd": {
       "type": "object",
       "required": [
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8"
       ],
       "properties": {
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8": {
         "type": "string"
        }
       }
      },
      "market_cap_usd": {
       "type": "object",
       "required": [
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8"
       ],
       "properties": {
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8": {
         "type": "null"
        }
       }
      },
      "h24_price_change_percentage": {
       "type": "object",
       "required": [
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8"
       ],
       "properties": {
        "0x0004a2c7a40d97add19a428dae3fab4654c0c4a8": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/pro-api-coingecko-com-df8dbec7/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)
