# meryol-payai Cross-Chain Token Price Sanity Check

> meryol-payai Cross-Chain Token Price Sanity Check is a paid API for AI agents from meryol-payai.hf.space, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-11).

Fetches a median token price in USD aggregated from CoinGecko, DexScreener, and GeckoTerminal, with per-source quotes, spread in basis points, and stale/divergent feed detection.

## Facts

- Endpoint: GET https://meryol-payai.hf.space/price/cross/:chain/:token?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/meryol-payai-cross-chain-token-price-sanity-check-8ae3ecd6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_M3cyPllGFsop2xYR8xzzW

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 meryol-payai-cross-chain-token-price-sanity-check-8ae3ecd6
```

Example prompt: Before I swap, do a cross-source price sanity check on AERO on Base — give me the median price, per-source quotes from CoinGecko/DexScreener/GeckoTerminal, and the spread in basis points so I can spot any stale or divergent feeds.

## When to prefer this

Use this endpoint when an agent needs to validate a token price before quoting or executing a trade, especially when you want multi-source consensus and automatic detection of stale or manipulated feeds. Prefer this over a single-source price API when spread and divergence detection are important for risk management.

## Known failure modes

- Token not found on any source — returns error or null price
- Chain not supported — 400/422 for values outside ethereum/base/arbitrum/optimism enum
- All sources diverge beyond 20% — spread cannot be computed from agreeing sources
- Network timeout to upstream price feeds — may return partial data
- Invalid ERC-20 address format — path param rejected
- Payment not included — 402 payment required response

## How this service works

Pre-quote price sanity check: median across CoinGecko + DexScreener + GeckoTerminal with per-source quotes and spread in bps (broken >20%-off sources excluded from spread, kept visible). token = ticker (eth/btc/usdc/usdt/dai/aero…) or any ERC-20 address. Detects stale or divergent feeds before an agent quotes or trades. Chains: ethereum, base, arbitrum, optimism.

## Output

Returns a median_price_usd computed across up to three sources (CoinGecko, DexScreener, GeckoTerminal), individual per-source quotes, spread in basis points between agreeing sources, and flags for sources excluded due to >20% divergence or staleness.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "pathParams": {
   "chain": "base",
   "token": "aero"
  }
 }
}
```

## 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"
    },
    "pathParams": {
     "type": "object",
     "required": [
      "chain",
      "token"
     ],
     "properties": {
      "chain": {
       "enum": [
        "ethereum",
        "base",
        "arbitrum",
        "optimism"
       ],
       "type": "string"
      },
      "token": {
       "type": "string",
       "description": "ticker (eth/usdc/aero) or 0x address"
      }
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "median_price_usd",
      "sources"
     ]
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/meryol-payai-cross-chain-token-price-sanity-check-8ae3ecd6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from meryol-payai.hf.space](https://www.zero.xyz/host/meryol-payai.hf.space/llms.txt)
