# Myworker Agent API – DeFi Yield Data

> Myworker Agent API – DeFi Yield Data is a paid API for AI agents from crypto-micro-agent.mykira.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-19).

Returns top DeFi yield/APY opportunities across protocols and chains, sourced from DeFiLlama, filterable by pool count and stablecoin-only preference.

## Facts

- Endpoint: GET https://crypto-micro-agent.mykira.workers.dev/api/agent/yield-defi?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/myworker-agent-api-defi-yield-data-c626c7c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B8kzDFtka0O3DnQXvPaKH

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 myworker-agent-api-defi-yield-data-c626c7c5
```

Example prompt: Show me the top 5 DeFi yield pools right now, including both stablecoin and non-stablecoin pools, so I can see the highest APY opportunities across protocols.

## When to prefer this

Choose this endpoint when you need real-time DeFi yield data aggregated across multiple protocols and chains, especially when you want to filter for stablecoin-only pools. It is well-suited for agents doing portfolio rebalancing recommendations, yield comparison, or DeFi opportunity discovery. Prefer this over manual DeFiLlama scraping when you need a pay-per-call, agent-ready API with structured JSON output.

## Known failure modes

- DeFiLlama upstream outage returns empty or error result
- Invalid jumlah value (outside 1-10 range) may return default or error
- Payment failure via x402 protocol returns 402 status and no data
- Network timeout if DeFiLlama API is slow

## How this service works

Servis berbayar untuk bot/agen (x402): data pasaran Solana via Jupiter + RPC, dan servis AI via Workers AI. Bayar per panggilan dengan USDC di Solana, USDC di Base, atau SOL.

## Output

A JSON array of DeFi pool objects, each containing the protocol name (projek), pool symbol (simpbol), TVL in USD (tvl_usd), total APY (apy_peratus), base APY (apy_asas_peratus), bonus APY (apy_bonus_peratus), blockchain network (rangkaian), and whether it is a stablecoin pool (stabil). Also includes metadata: data source (DeFiLlama), stablecoin filter status, number of results requested, and minimum TVL threshold applied.

## 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"
    },
    "queryParams": {
     "type": "object",
     "example": {
      "jumlah": 5,
      "stabil": false
     },
     "properties": {
      "jumlah": {
       "type": "integer",
       "description": "Bilangan pool (1-10, lalai 5)"
      },
      "stabil": {
       "type": "boolean",
       "description": "Hanya pool stablecoin (cth Aave, Compound)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "hasil": {
   "hasil": [
    {
     "projek": "Pendle",
     "stabil": true,
     "simpbol": "USDe/Ethena PT",
     "tvl_usd": 210000000,
     "rangkaian": "Ethereum",
     "apy_peratus": 15.4,
     "apy_asas_peratus": 15.4,
     "apy_bonus_peratus": null
    },
    {
     "projek": "Aave",
     "stabil": true,
     "simpbol": "ABUSD-C",
     "tvl_usd": 560000000,
     "rangkaian": "Polygon",
     "apy_peratus": 8.1,
     "apy_asas_peratus": 6.2,
     "apy_bonus_peratus": 1.9
    }
   ],
   "sumber": "defillama-yields",
   "tapis_stabil": false,
   "jumlah_diminta": 2,
   "disungi_tvl_usd": 10000000
  },
  "servis": "yield-defi"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/myworker-agent-api-defi-yield-data-c626c7c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto-micro-agent.mykira.workers.dev](https://www.zero.xyz/host/crypto-micro-agent.mykira.workers.dev/llms.txt)
