> ## Documentation Index
> Fetch the complete documentation index at: https://yieldxyz.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Retrieve detailed metadata, APY/APR rates, token information, validator data, and protocol details for a specific yield opportunity on Yield.xyz. Use when the user asks about a particular yield's details, rates, validators, requirements, or configuration.

# SKILL

# Get Yield Info

Retrieve comprehensive details about a specific yield opportunity, including APY/APR rates, token metadata, validator information, protocol details, cooldown periods, and action requirements.

## When to Use

Activate this skill when the user asks to:

* Get details about a specific yield (e.g., "Tell me about Lido ETH staking")
* Check the current APY/APR for a yield
* View validators available for a staking yield
* Understand the requirements or arguments needed to enter/exit a yield
* Check if a yield supports certain actions (enter, exit, manage)
* View cooldown or warmup periods for a yield

## Authentication

All requests require an API key in the `x-api-key` header:

```
x-api-key: YOUR_API_KEY
```

## Base URL

```
https://api.yield.xyz/v1
```

## Step-by-Step Instructions

### Step 1: Get Yield Metadata

**Endpoint:** `GET /v1/yields/{yieldId}`

**Path Parameters:**

| Parameter | Type   | Required | Description                                                     |
| --------- | ------ | -------- | --------------------------------------------------------------- |
| `yieldId` | string | Yes      | The unique yield identifier (e.g., `ethereum-eth-lido-staking`) |

**Example Request:**

```bash theme={null}
curl "https://api.yield.xyz/v1/yields/ethereum-eth-lido-staking" \
  -H "x-api-key: $YIELD_API_KEY"
```

**Example Response:**

```json theme={null}
{
  "id": "ethereum-eth-lido-staking",
  "token": {
    "symbol": "ETH",
    "name": "Ethereum",
    "decimals": 18,
    "network": "ethereum",
    "address": "0x0000000000000000000000000000000000000000"
  },
  "rewardRate": 0.035,
  "rewardType": "APY",
  "metadata": {
    "provider": {
      "id": "lido",
      "name": "Lido",
      "logoURI": "https://assets.stakek.it/providers/lido.png"
    },
    "type": "staking",
    "cooldownPeriod": null,
    "warmupPeriod": null,
    "description": "Stake ETH and receive stETH"
  },
  "status": {
    "enter": true,
    "exit": true
  },
  "args": {
    "enter": {
      "amount": { "required": true, "type": "string" }
    },
    "exit": {
      "amount": { "required": true, "type": "string" }
    }
  }
}
```

### Step 2: Get Validators (for Staking Yields)

**Endpoint:** `GET /v1/yields/{yieldId}/validators`

**Query Parameters:**

| Parameter   | Type    | Description                         |
| ----------- | ------- | ----------------------------------- |
| `offset`    | number  | Pagination offset (default: 0)      |
| `limit`     | number  | Items per page (1-100, default: 20) |
| `preferred` | boolean | Filter to preferred validators only |

**Example Request:**

```bash theme={null}
curl "https://api.yield.xyz/v1/yields/cosmos-atom-native-staking/validators?preferred=true&limit=10" \
  -H "x-api-key: $YIELD_API_KEY"
```

**Example Response:**

```json theme={null}
{
  "items": [
    {
      "address": "cosmosvaloper1...",
      "preferred": true,
      "name": "Chorus One",
      "logoURI": "https://assets.stakek.it/validators/chorusone.png",
      "website": "https://chorus.one",
      "commission": 0.075,
      "votingPower": 0.02,
      "status": "active",
      "rewardRate": {
        "total": 0.145,
        "rateType": "APR"
      }
    }
  ],
  "total": 25,
  "offset": 0,
  "limit": 10
}
```

### Step 3: Get Provider Details

**Endpoint:** `GET /v1/providers/{providerId}`

```bash theme={null}
curl "https://api.yield.xyz/v1/providers/lido" \
  -H "x-api-key: $YIELD_API_KEY"
```

### Step 4: Determine Yield ID

If the user provides a token and protocol name rather than a yield ID, use the search endpoint:

```bash theme={null}
curl "https://api.yield.xyz/v1/yields?search=lido&token=ETH&limit=5" \
  -H "x-api-key: $YIELD_API_KEY"
```

Yield IDs follow the pattern: `{network}-{token}-{provider}-{type}`

Common examples:

* `ethereum-eth-lido-staking` — Lido ETH liquid staking
* `ethereum-usdc-aave-v3-lending` — Aave V3 USDC lending on Ethereum
* `cosmos-atom-native-staking` — Cosmos ATOM native staking
* `solana-sol-native-staking` — Solana SOL native staking
* `ethereum-usde-ethena-staking` — Ethena USDe staking

## Key Response Fields

| Field                     | Description                                              |
| ------------------------- | -------------------------------------------------------- |
| `id`                      | Unique yield identifier                                  |
| `token`                   | Primary token (symbol, name, decimals, network, address) |
| `rewardRate`              | Current yield rate as a decimal (e.g., 0.035 = 3.5%)     |
| `rewardType`              | `APY` (auto-compound) or `APR` (manual claim)            |
| `metadata.provider`       | Protocol/provider details                                |
| `metadata.type`           | Yield type: staking, lending, vault, restaking, etc.     |
| `metadata.cooldownPeriod` | Time before exit completes (if applicable)               |
| `metadata.warmupPeriod`   | Time before rewards start (if applicable)                |
| `status.enter`            | Whether deposits are currently enabled                   |
| `status.exit`             | Whether withdrawals are currently enabled                |
| `args`                    | Required arguments for enter/exit/manage actions         |

## Presenting Information

When presenting yield info to the user, format it clearly:

1. **Name and type** (e.g., "Lido ETH Staking on Ethereum")
2. **Current rate** (e.g., "3.5% APY")
3. **Token** and network
4. **Status** (accepting deposits / withdrawals)
5. **Cooldown/warmup periods** if applicable
6. **Validators** (for staking yields — show top preferred validators)

## Error Handling

| Status Code | Meaning         | Action                                                |
| ----------- | --------------- | ----------------------------------------------------- |
| 404         | Yield not found | Verify yield ID format; use search to find correct ID |
| 401         | Unauthorized    | Check API key                                         |
| 429         | Rate limited    | Respect `retry-after` header                          |

## Edge Cases

* **Yield not found:** If a 404 is returned, the yield ID may be incorrect or the yield may have been deprecated. Search using `GET /v1/yields?search=...` to find the correct ID.
* **Validators not available:** Not all yields have validators. Lending and vault yields typically do not. Only staking and restaking yields have validators.
* **Deprecated yields:** Some yields may exist but have `status.enter: false`, meaning no new deposits are accepted.
* **Multi-token yields:** Some yields (e.g., LP positions) may have multiple canonical tokens. Check the `canonicalTokens` field if present.
* **Rate fluctuations:** Yield rates change frequently. Always present rates as "current" and note they may change.
