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.

Overview

The Yield.xyz API provides unified infrastructure for yield and perpetual futures trading. Access 2,900+ yield opportunities across 80+ blockchain networks through a single, normalized interface.

Yield API

Build transactions for yield interaction and retrieve relevant balance and yield data. The API consolidates detailed yield metadata for all supported staking and DeFi projects into a single interface, including:
  • Up-to-date metrics — Token and yield-specific APY/APR rates
  • Validator metadata — Individual validator APY, commission, voting power, staked balance
  • Supplementary metadata — Images, addresses, validator names, provider information
  • Balance types — Staked, unstaking, unstaked, rewards, locked, unlocking, and more

Perps API (PerpsKit)

PerpsKit is Yield.xyz’s modular infrastructure for on-chain perpetual futures (“perps”). It aggregates perp venues behind a normalized interface so wallets, exchanges, and fintech apps can launch perps trading with minimal engineering lift — while keeping execution self-custodial. PerpsKit provides:
  • A unified model for markets, portfolio state, and trading actions
  • Transaction construction that returns ordered, unsigned payloads for client-side signing
  • Flexible monetization via builder codes / partner fee logic (venue-dependent)
  • Operational controls for production deployments, including configurable geo-restrictions

Base URLs

https://api.yield.xyz/v1
Use for mainnet transactions in production environments.
See Base URLs for complete environment details.

API Endpoints

Yield API

EndpointDescription
GET /v1/yieldsList all yield opportunities with metadata, APY, and validator info
GET /v1/yields/{id}Get detailed information for a specific yield
GET /v1/yields/{id}/validatorsGet validators for a specific yield
POST /v1/yields/balancesGet aggregated balances across yields
POST /v1/yields/{id}/balancesGet balances for a specific yield
GET /v1/networksList all supported networks
GET /v1/providersList all yield providers
POST /v1/actions/enterCreate an enter/deposit action
POST /v1/actions/exitCreate an exit/withdraw action
POST /v1/actions/manageCreate a management action (claim, restake, etc.)

Perps API

EndpointDescription
GET /v1/perps/providersList aggregated trading platforms
GET /v1/perps/marketsList available markets across all venues
GET /v1/perps/positionsGet user positions
GET /v1/perps/ordersGet user orders
POST /v1/perps/actionsExecute trades

Authentication

All requests require an API key in the x-api-key header:
curl https://api.yield.xyz/v1/yields \
  -H "x-api-key: YOUR_API_KEY"

Get Your API Key

Sign up to create your API key
See Authentication for details.

Quick Start

1. Get Your API Key

Sign up and create an API key from your dashboard.

2. List Yield Opportunities

curl https://api.yield.xyz/v1/yields?limit=5 \
  -H "x-api-key: YOUR_API_KEY"

3. Get User Balances

curl -X POST https://api.yield.xyz/v1/yields/balances \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": [{
      "address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
      "network": "ethereum"
    }]
  }'

4. Explore the API

Discovery

Find yield opportunities with up-to-date metrics and validator metadata

Actions

Create transactions for entering, exiting, and managing yields

Portfolio

Fetch and organize balance data across blockchains

Health

Check API status and availability

Supported Perps Venues

PerpsKit aggregates multiple perp venues behind a normalized interface:
PlatformStatusDescription
HyperliquidLiveHigh-performance perps on its own L1
GMXLiveDecentralized perpetual exchange
dYdXComing soonDecentralized spot and perpetual exchange
DriftComing soonSolana-based perpetual exchange
Perps venues have venue-specific behavior (supported order types, margin modes, leverage caps, funding cadence, and collateral models). PerpsKit normalizes the integration surface while preserving venue constraints in metadata.

What PerpsKit Standardizes

Markets

Market metadata and venue-specific constraints (order types, margin modes, leverage ranges, fees, funding)

Portfolio State

Positions, orders, collateral, margin usage, and unrealized PnL in a consistent shape across venues

Trading Actions

A unified action model (open/close/update leverage/stop-loss/take-profit/cancel) mapped to venue execution

Unsigned Transactions

Ordered, unsigned payloads you route into your signing stack (EOA, smart accounts, MPC, custody)

Next Steps

Authentication

Learn about API key authentication

Base URLs

Environments, staging, and rate limits

Yield Metadata

Understanding the YieldDto structure

Perps Markets

Browse available perps markets