Skip to main content

Documentation Index

Fetch the complete documentation index at: https://yieldxyz.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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:
ParameterTypeRequiredDescription
yieldIdstringYesThe unique yield identifier (e.g., ethereum-eth-lido-staking)
Example Request:
curl "https://api.yield.xyz/v1/yields/ethereum-eth-lido-staking" \
  -H "x-api-key: $YIELD_API_KEY"
Example Response:
{
  "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:
ParameterTypeDescription
offsetnumberPagination offset (default: 0)
limitnumberItems per page (1-100, default: 20)
preferredbooleanFilter to preferred validators only
Example Request:
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:
{
  "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}
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:
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

FieldDescription
idUnique yield identifier
tokenPrimary token (symbol, name, decimals, network, address)
rewardRateCurrent yield rate as a decimal (e.g., 0.035 = 3.5%)
rewardTypeAPY (auto-compound) or APR (manual claim)
metadata.providerProtocol/provider details
metadata.typeYield type: staking, lending, vault, restaking, etc.
metadata.cooldownPeriodTime before exit completes (if applicable)
metadata.warmupPeriodTime before rewards start (if applicable)
status.enterWhether deposits are currently enabled
status.exitWhether withdrawals are currently enabled
argsRequired 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 CodeMeaningAction
404Yield not foundVerify yield ID format; use search to find correct ID
401UnauthorizedCheck API key
429Rate limitedRespect 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.