# Merkl Stable Yield Ranking API

> Merkl Stable Yield Ranking API is a paid API for AI agents from golf-evm-math.x402-evm-math.workers.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-28).

Returns a live-ranked list of stablecoin yield opportunities on Base from Merkl reward campaigns, sorted by net APR after gas, filtered to TVL ≥ $100k, refreshed every 2 hours.

## Facts

- Endpoint: GET https://golf-evm-math.x402-evm-math.workers.dev/merkl-stable?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/merkl-stable-yield-ranking-api-c917bbb8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__xOUv_zcEG3F4lznAyx_H

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 merkl-stable-yield-ranking-api-c917bbb8
```

Example prompt: What are the top stablecoin yield opportunities on Base right now? I want to see the best net APR from Merkl campaigns, ranked, with TVL above $100k.

## When to prefer this

Choose this endpoint when you need a pre-filtered, pre-ranked, gas-adjusted stablecoin yield snapshot specifically on Base from Merkl campaigns — it saves you from querying Merkl directly and applying TVL filters and net APR calculations yourself. Ideal for yield farming agents that need a quick, actionable ranking without raw data wrangling. Prefer this over generic DeFi aggregators when you specifically want Merkl reward campaign data on Base with a freshness guarantee of 2 hours.

## Known failure modes

- Stale data if Merkl upstream is delayed beyond the 2-hour refresh window
- Empty campaign array if no campaigns currently meet the TVL ≥ $100k threshold on Base
- Payment failure (402) if USDC micropayment is not correctly submitted via x402 protocol
- Rate limiting or worker timeout on the Cloudflare edge if traffic spikes
- Partial data if Merkl API returns incomplete campaign information during refresh

## How this service works

Exact EVM address, calldata, Uniswap V2/V3 and impermanent-loss math. Pay per call in USDC on Base via x402.

## Output

A JSON object containing the chain name, a timestamp of the last data refresh, and an array of ranked stablecoin yield campaigns. Each campaign entry includes its rank, gross APR percentage, net APR percentage (after gas), TVL in USD, protocol name, campaign name, and days remaining in the campaign. Data is sourced from Merkl and refreshed every 2 hours.

## 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": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "stamp": "data from echo, updated 2026-10-22 22:50 UTC",
  "campaigns": [
   {
    "rank": 1,
    "apr_pct": 37.2,
    "tvl_usd": 262752,
    "campaign": "Supply USDC vault",
    "protocol": "Hyperdrive",
    "days_left": 160,
    "net_apr_pct": 37.1
   }
  ],
  "data_from": "echo"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/merkl-stable-yield-ranking-api-c917bbb8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from golf-evm-math.x402-evm-math.workers.dev](https://www.zero.xyz/host/golf-evm-math.x402-evm-math.workers.dev/llms.txt)
