# Chainlink Price Feed API

> Chainlink Price Feed API is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Fetches real-time cryptocurrency price data from Chainlink decentralized oracle feeds across multiple EVM chains, returning median price, spread, and per-chain results.

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/chainlink-price?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainlink-price-feed-api-d6a452e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dlLrxmYb-XpY3EEYxB7Un

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 chainlink-price-feed-api-d6a452e1
```

Example prompt: What's the current ETH/USD price from Chainlink across all chains? I want the median price and the spread between chains.

## When to prefer this

Choose this endpoint when you need decentralized, on-chain price data sourced from Chainlink oracles rather than centralized exchange APIs. Ideal for DeFi applications, smart contract parameter calculation, cross-chain price comparison, and any use case where tamper-resistant oracle pricing is required. Supports aggregation across multiple EVM-compatible chains in a single call.

## Known failure modes

- Unsupported trading pair returns error or empty results
- Unsupported chain enum value returns validation error
- Chainlink feed not available on requested chain returns no result for that chain
- Stale feed data may be returned if oracle hasn't updated recently
- Network timeout if underlying RPC nodes are slow

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

Returns a JSON object containing the trading pair, a results array with per-chain data (price, feed address, block number, chain name, chain ID, decimals, round ID, age in seconds, last updated UTC timestamp), total number of feeds read, spread percentage across chains, and the median price across all chains queried.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pair"
     ],
     "properties": {
      "pair": {
       "type": "string",
       "description": "e.g. ETH/USD, BTC, cbETH/USD (USD quote only)"
      },
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism",
        "polygon",
        "bsc"
       ],
       "type": "string",
       "description": "optional; omit to read all chains with this pair"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "pair": "ETH/USD",
  "results": [
   {
    "ok": true,
    "feed": "0x71041dddad3595F9CEd3DcCFBe3D1F4b0a16Bb70",
    "block": 52790760,
    "chain": "base",
    "price": "2416.00578766",
    "chainId": 8453,
    "decimals": 8,
    "positive": true,
    "round_id": "55340232221128663698",
    "age_seconds": 41,
    "updated_at_utc": "2026-10-19T00:47:07.000Z"
   }
  ],
  "feeds_read": 6,
  "spread_pct": 0.4082,
  "median_price": 2413.040993315
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainlink-price-feed-api-d6a452e1/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
