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.
What Balances Represent
The Balances API provides a lifecycle-aware view of user positions. Unlike simple token balances, Yield.xyz balances reflect where assets are in the yield lifecycle — active, entering, exiting, or claimable. This enables accurate portfolio UX, operational reporting, and next-action prompts without protocol-specific state management.Lifecycle States
- available
- preparing
- unstaking
- unlocked
- rewards
Active position earning yield
- Currently staked or deposited
- Actively earning rewards
- Can initiate exit at any time
Not all yields use all states. Liquid staking (Lido, Rocket Pool) typically has only
available — no cooldowns. Native staking (Cosmos, Polkadot) uses the full lifecycle.Pending Actions
When a position has actions the user can or must take, the API includespendingActions:
| Action | When it appears |
|---|---|
CLAIM_REWARDS | Rewards ready to claim |
CLAIM_UNSTAKED | Unbonding complete, funds ready |
WITHDRAW | Vault withdrawal ready to finalize |
REDELEGATE | Validator change available |
Portfolio Endpoints
Two endpoints power position tracking:Single yield balances
Fetch a user’s position in a specific yield:Aggregate balances
Fetch positions across multiple yields and networks in one request:Position Origins
Balances may reflect positions created through Yield.xyz or positions that existed before integration.- Yield.xyz-originated
- Non-originating
Positions created via Yield.xyz actions.
- Full lifecycle tracking from entry
- Reward accrual data from entry date
- Included in baseline DataKit
Balance Response Structure
Each balance includes:| Field | Description |
|---|---|
type | Lifecycle state (available, rewards, unstaking, etc.) |
amount | Token amount in human-readable format |
token | Token metadata (symbol, decimals, address) |
pricePerShare | For yield-bearing tokens (stETH, aUSDC) |
date | Timestamp of the balance snapshot |
pendingActions | Available management actions |
Common Patterns
Portfolio dashboard
Portfolio dashboard
Use aggregate balances to display all positions across networks. Group by network or yield type for clean UX.
Claimable rewards
Claimable rewards
Filter for
type: rewards with amount > 0 to highlight claimable rewards.Pending withdrawals
Pending withdrawals
Check
type: unstaking or type: unlocked to show in-progress and completed exits.Cooldown timers
Cooldown timers
Use
unlockDate (where available) to display remaining unbonding time.API Reference
Yield Balances
GET /v1/yields//balances
Aggregate Balances
POST /v1/yields/balances
Next Steps
Fees
Understand fee structures and monetization
Tracking Balances Guide
Detailed implementation patterns

