# APIX402 Oracle Staleness Checker (Base)

> APIX402 Oracle Staleness Checker (Base) is a paid API for AI agents from api402x.com, paid per call via x402, $0.003/call, status down (last checked 2026-10-13).

Reports the real-time staleness of Chainlink and Pyth oracle prices on Base, with per-feed staleness bounds and a Chainlink-vs-Pyth spread contextualized against Pyth's own confidence interval.

## Facts

- Endpoint: GET https://api402x.com/oracle-staleness?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: down
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apix402-oracle-staleness-checker-base-ac8ea3c4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AuSqpgBCC47eJp7I_u2ZX

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 apix402-oracle-staleness-checker-base-ac8ea3c4
```

Example prompt: Check whether the ETH/USD oracle prices from Chainlink and Pyth are currently stale on Base, and tell me if a standard staleness guard would reject either of them — also show me the spread between the two and whether it's outside Pyth's confidence interval.

## When to prefer this

Choose this endpoint when you need authoritative, per-feed staleness analysis for Chainlink and Pyth on Base rather than writing your own on-chain reader — especially when the correct proxy address, heartbeat cadence, and meaning of 'stale' for each specific feed are not already known. It is also the right choice when you need to compare oracle prices while correctly contextualizing any spread against Pyth's own confidence interval to avoid false divergence alarms.

## Known failure modes

- Unsupported asset symbol returns an error rather than a generic result
- Network or RPC issues on Base may cause a failed or delayed response
- Truncated or malformed asset query parameter results in a refusal
- Payment failure via x402 returns a 402 response before any data is returned

## How this service works

Onchain- and crypto-market data for trading AI agents. Payment via x402 (USDC, exact scheme).

## Output

Returns a JSON object with one entry per requested asset (defaulting to ETH/USD, BTC/USD, and USDC/USD), each containing: Chainlink proxy address, implementation address, current price, age in seconds, per-feed staleness bound, whether a standard guard would reject it; Pyth feed ID, contract address, price, age, valid_time_period, confidence interval, and rejection verdict; the Chainlink-vs-Pyth spread in bps with interpretation relative to Pyth's confidence interval; and an overall staleness verdict with human-readable explanation. Also includes the block number and timestamp at which all readings were taken.

## 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": [],
     "properties": {
      "assets": {
       "type": "string",
       "description": "Optional. Comma-separated asset list, e.g. \"ETH/USD,BTC/USD\". Supported: ETH/USD, BTC/USD, USDC/USD. Omit for all three. An unsupported asset is refused rather than served with a generic threshold."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "description": "Full JSON Schema for this response is at /openapi.json, and the free /preview sibling returns the same shape on live data. It is not inlined here because response headers have a hard 16 KB limit in common HTTP clients (Node's default) and this response is large. The example alongside is complete and real."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 1,
  "assets": [
   {
    "pyth": {
     "expo": -8,
     "price": "1890.77072612",
     "feed_id": "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace",
     "contract": "0x8250f4aF4B972684F7b336503E2D6dFeDeB1487a",
     "price_raw": "189077072612",
     "confidence": "1.65561399",
     "guard_rule": "Pyth's own recommended guard is getPriceNoOlderThan(id, 60), where 60s is this contract's live getValidTimePeriod(). It reverts when now - publishTime exceeds that bound. This value is derived from getPriceUnsafe(), not by calling the guard: on-chain Pyth is pull-based and the guard does revert in production, so a read path that used it would fail precisely when the answer is interesting.",
     "age_seconds": 125,
     "publish_time": "2026-08-13T06:42:55.000Z",
     "confidence_raw": "165561399",
     "implementation": "0x41c9e39574f40ad34c79f1c99b66a45efb830d4c",
     "would_revert_with_error": "StalePrice()",
     "valid_time_period_seconds": 60,
     "would_revert_with_selector": "0x19abf40e",
     "would_standard_guard_reject": true,
     "implementation_matches_pinned": true
    },
    "asset": "ETH/USD",
    "chain": "eip155:8453",
    "spread": {
     "bps": 12.1,
     "interpretation": "Chainlink and Pyth differ by 12.1 bps. Pyth's own confidence interval on this price is 8.75 bps, so this single reading sits OUTSIDE Pyth's stated uncertainty. That is not by itself evidence the oracles disagree: one sample outside a stated band is unremarkable, and a sustained pattern rather than one reading would be needed to call it a real divergence. Note also that the two prices are stamped 1070s apart (Chainlink is the older of the two), so part of any gap is simply the market moving between the two observations, not the oracles disagreeing.",
     "unavailable_reason": null,
     "pyth_confidence_bps": 8.75,
     "exceeds_pyth_confidence": true
    },
    "verdict": "ETH/USD: Chainlink is 1195s (0.33h) old against a measured 1200s heartbeat, which is inside its own 1320s bound — a consumer guard built on this feed's heartbeat would accept it. A consumer applying one uniform 60s bound to every feed would wrongly reject it: this feed is behaving exactly as designed. On-chain Pyth is 125s old against its own 60s validity window — Pyth's recommended guard getPriceNoOlderThan(id, 60) WOULD REVERT right now with StalePrice() (0x19abf40e). On-chain Pyth is pull-based: it holds whatever was last pushed, so t
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apix402-oracle-staleness-checker-base-ac8ea3c4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api402x.com](https://www.zero.xyz/host/api402x.com/llms.txt)
