# ChainRay Chain Compare

> ChainRay Chain Compare is a paid API for AI agents from chainray.online, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-16).

Compares multiple blockchain networks side-by-side on gas fees, block time, and DeFi analytics, returning ranked results with verifiable on-chain proofs

## Facts

- Endpoint: GET https://chainray.online/chain-compare
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainray-chain-compare-c63f4cf9
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_N8qOz3nUxXk4i8hfL4ADi

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 chainray-chain-compare-c63f4cf9
```

Example prompt: Compare Ethereum, Arbitrum, and Base right now — which one has the cheapest gas and fastest block times, and what DeFi supply rates are available on each?

## When to prefer this

Use this endpoint when an agent needs to choose the optimal blockchain for a transaction, deployment, or DeFi action and requires a verifiable, multi-chain comparison in a single call. Prefer it over single-chain gas endpoints when the user's goal is to identify the best chain rather than query a specific one. The verifiable proof makes it suitable for use cases requiring auditability.

## Known failure modes

- Unsupported chain identifier returns no matching comparison entry
- Gas object may be empty if gas data is temporarily unavailable for a chain
- DeFi APY may return 'N/A' if no active markets exist on that chain
- Network timeout if underlying RPC nodes are unresponsive
- Proof fields may lag slightly if block confirmation is delayed

## How this service works

The most complete blockchain data and intelligence service for AI agents. 93 endpoints across 46 chains, from gas fees to DeFi analytics, with real-time streams, intent routing, and verifiable proofs. Pay-per-request via x402.

## Output

Returns an array of chain objects each containing gas data, DeFi protocol info (best supply APY, available markets), block time, and chain name; plus a rankings object identifying the cheapest-gas and fastest-block chain; a timestamp; total chains compared; and a cryptographic on-chain proof (block hash, data hash, block number, proof version) anchored to a specific block for verifiability.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum"
  }
 }
}
```

## 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",
     "properties": {
      "chain": {
       "type": "string",
       "description": "Blockchain network (e.g., base, ethereum, polygon)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainray-chain-compare-c63f4cf9/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chainray.online](https://www.zero.xyz/host/chainray.online/llms.txt)
