# CoinGecko Onchain Token Price – Base Network (0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed)

> CoinGecko Onchain Token Price – Base Network (0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed) 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-13).

Returns the current onchain USD price and market data for the token at contract address 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed on the Coinbase Base network.

## Facts

- Endpoint: GET https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/base/token_price/0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed
- Price: $0.010000/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/pro-api-coingecko-com-20fe2a2e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_idAnHTczNtiCfucODC0Vu

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-20fe2a2e
```

Example prompt: What's the current onchain USD price, 24h trading volume, market cap, and 24h price change for the token at contract 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed on the Base network?

## When to prefer this

Use this endpoint when you need real-time onchain price data for the specific token at 0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed on Base, sourced from DEX liquidity pools rather than centralized exchange feeds. Prefer this over CoinGecko's off-chain /simple/price endpoint when you need DEX-native pricing, reserve data, or when the token is not listed on major centralized exchanges. Ideal for DeFi analytics, portfolio trackers, or arbitrage monitors focused on the Base ecosystem.

## Known failure modes

- Token contract not found or not indexed by CoinGecko — returns empty or null data
- Invalid contract address format — may return 400 or empty response
- Network mismatch (wrong chain) — no price data returned
- Payment failure (x402 flow) — 402 response if USDC payment not completed
- CoinGecko API unavailable or rate-limited — 5xx or 429 error
- Token is inactive on Base DEX — no recent price available if include_inactive_source is false

## How this service works

Returns the current price for a specified token contract on the Base network using CoinGecko's onchain pricing API.

## Output

Returns a JSON object keyed by the token contract address (lowercased) containing: current USD price as a string, 24-hour volume in USD, market cap in USD, total liquidity reserve in USD, and 24-hour price change percentage — all sourced from CoinGecko's onchain DEX aggregation.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "include_24hr_vol": true,
   "mcap_fdv_fallback": false,
   "include_market_cap": true,
   "include_inactive_source": false,
   "include_24hr_price_change": true,
   "include_total_reserve_in_usd": false
  }
 },
 "output": {
  "type": "object",
  "example": {
   "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed": {
    "usd": 0.00123,
    "usd_24h_vol": 1500000,
    "usd_24h_change": 5.25,
    "usd_market_cap": 500000000
   }
  }
 }
}
```

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

## More

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