# DeFi API - Real-Time Token Price by CoinGecko ID or Symbol

> DeFi API - Real-Time Token Price by CoinGecko ID or Symbol is a paid API for AI agents from defi-api.agenticfi.wtf, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-11).

Returns the current USD price of a cryptocurrency token along with its 24-hour change, trading volume, and market cap, identified by CoinGecko ID or symbol.

## Facts

- Endpoint: GET https://defi-api.agenticfi.wtf/api/token/price/BTC?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-api-real-time-token-price-by-coingecko-id-or-symbol-8ef07812
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Et-N6Em1jKt89PZKuU3Q4

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 defi-api-real-time-token-price-by-coingecko-id-or-symbol-8ef07812
```

Example prompt: What's the current price of Ethereum right now, including its 24-hour change and market cap?

## When to prefer this

Choose this endpoint when you need a quick, real-time spot price for a well-known cryptocurrency by its CoinGecko ID or common ticker symbol, along with key market metrics (24h change, volume, market cap). It is ideal for lightweight price checks, portfolio valuation, or pre-trade research. Prefer it over DEX pair or on-chain price feeds when you want aggregated market data rather than raw on-chain swap prices.

## Known failure modes

- Unknown or unsupported token symbol/ID returns an error or empty result
- Ambiguous symbol (e.g. a symbol shared by multiple tokens) may resolve to an unexpected token
- CoinGecko data lag during high-volatility periods may result in slightly stale prices
- Network or provider downtime results in a 5xx error
- Malformed or missing idOrSymbol parameter returns a 400-level error

## How this service works

Real-time token price by CoinGecko ID or symbol - includes 24h change, volume, market cap

## Output

Returns the current USD price of the requested token sourced via CoinGecko, along with its 24-hour percentage price change, total trading volume (USD), and market capitalization (USD).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "pathParams",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "idOrSymbol"
     ],
     "properties": {
      "idOrSymbol": {
       "type": "string",
       "title": "idOrSymbol (required)",
       "description": "Required. CoinGecko ID or common symbol.\nTry one of these 10 examples: bitcoin, ethereum, solana, chainlink, uniswap, aave, maker, dogecoin, pepe, arbitrum\nSymbol examples: BTC, ETH, SOL, LINK, UNI, AAVE, MKR, DOGE, PEPE, ARB"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "idOrSymbol"
     ],
     "properties": {
      "idOrSymbol": {
       "type": "string",
       "title": "idOrSymbol (required)",
       "description": "Required. CoinGecko ID or common symbol.\nTry one of these 10 examples: bitcoin, ethereum, solana, chainlink, uniswap, aave, maker, dogecoin, pepe, arbitrum\nSymbol examples: BTC, ETH, SOL, LINK, UNI, AAVE, MKR, DOGE, PEPE, ARB"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-api-real-time-token-price-by-coingecko-id-or-symbol-8ef07812/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from defi-api.agenticfi.wtf](https://www.zero.xyz/host/defi-api.agenticfi.wtf/llms.txt)
