# ChainRay Yield Optimizer

> ChainRay Yield Optimizer is a paid API for AI agents from chainray.online, paid per call via x402, $0.05/call, status unknown (last checked 2026-09-13).

Returns top DeFi yield opportunities across chains, filterable by minimum TVL, to help agents identify the best current yield-bearing positions.

## Facts

- Endpoint: GET https://chainray.online/yield-optimizer
- Price: $0.05/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/chainray-yield-optimizer-be38de74
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BDKuMlJwelp7DCN4SbVpv

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-yield-optimizer-be38de74
```

Example prompt: Show me the best DeFi yield opportunities right now, filtered to only pools with at least $5 million TVL so I know they're reasonably liquid.

## When to prefer this

Use this endpoint when an agent needs to discover current DeFi yield opportunities and rank them by return, especially when you want to filter by liquidity depth (TVL). Prefer over generic DeFi aggregators when you need structured, agent-ready JSON with multi-chain coverage and verifiable data.

## Known failure modes

- No pools found meeting the minTvl threshold — try lowering the minimum TVL
- Payment required (402) if x402 USDC payment header is missing or insufficient
- Invalid minTvl value (non-numeric string) causing a 400 error
- Upstream data unavailability causing partial or empty results

## 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

A ranked list of DeFi yield opportunities across supported chains, each entry including protocol name, pool/vault address, chain, current APY, and TVL in USD — filtered by the minTvl threshold if provided.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "minTvl": "1000000"
  }
 }
}
```

## 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": {
      "minTvl": {
       "type": "string",
       "description": "Minimum TVL filter in USD (default: 1000000)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/chainray-yield-optimizer-be38de74/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)
