# Token Price Lookup — Live & Historical (x402utils)

> Token Price Lookup — Live & Historical (x402utils) is a paid API for AI agents from prices.x402utils.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-12).

Returns live or historical prices and percentage change for crypto tokens identified by CoinGecko IDs or chain:contract address pairs, across any chain.

## Facts

- Endpoint: GET https://prices.x402utils.workers.dev/v1/price?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/token-price-lookup-live-historical-x402utils-3583e273
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hZO55PqjBM-rfW87wWqCW

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 token-price-lookup-live-historical-x402utils-3583e273
```

Example prompt: What's the current price of Bitcoin and Ethereum right now? Use their CoinGecko IDs — bitcoin and ethereum.

## When to prefer this

Choose this endpoint when you need real-time or historical token prices across any blockchain, especially when tokens are identified by CoinGecko IDs or chain:contract address pairs. It is ideal for multi-chain DeFi workflows, portfolio valuation, price-triggered automations, or any agent that needs structured price data paid per call with USDC via x402 rather than a subscription API key.

## Known failure modes

- Invalid or unrecognized coin ID returns an error or empty entry for that coin
- Malformed comma-separated coin list causes a 400-level error
- Network or upstream CoinGecko outage may return stale or unavailable data
- Missing x402 payment header results in a 402 Payment Required response
- Requesting too many coins in a single call may result in timeouts or truncated results

## How this service works

Live and historical token prices for agents, any chain: coingecko ids or chain:contract addresses, plus % change over a period. Paid per call via x402 (USDC on Base).

## Output

Returns a JSON object with a `prices` map keyed by coin identifier (e.g. 'coingecko:bitcoin'), each containing the current USD price and token symbol, plus optional percentage change over the requested period.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "coins"
     ],
     "properties": {
      "coins": {
       "type": "string",
       "description": "comma-separated coin ids"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "prices": {
   "coingecko:bitcoin": {
    "price": 84376.78,
    "symbol": "BTC"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/token-price-lookup-live-historical-x402utils-3583e273/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from prices.x402utils.workers.dev](https://www.zero.xyz/host/prices.x402utils.workers.dev/llms.txt)
