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.
1. High-Level Evolution
| Area | Legacy (v1) | New (v2) |
|---|---|---|
| Action model | Separate “enter”, “exit”, and “pending” actions; each returns transaction IDs that must be constructed one-by-one. | Unified “enter”, “exit”, “manage” intents. One call returns all ready-to-sign transactions in order. |
| Schema | Arguments documented per yield, but often custom field names and nesting (addresses, etc.). | Schema-driven: every yield exposes a formal mechanics.arguments schema that tells you exactly what to send. |
| Validators | Usually embedded in the main yield response; a /validators endpoint also existed. | Kept separate for performance. Fetch with GET /v1/yields/{yieldId}/validators when needed. |
| Transaction tracking | Submit hash per transaction. | Submit hash per transaction. |
| Discovery filters | Limited filtering. | Advanced query params (input tokens, network, provider) plus /networks and /providers endpoints for context. |
| Performance | Monolithic payloads, no pagination. | Pagination on large lists, leaner responses, lower latency. |
| Interfaces | — | General overhaul of DTOs and interfaces to align concepts |
2. Yield Discovery & Metadata
| Purpose | Legacy Endpoint | New Endpoint | What Changed |
|---|---|---|---|
| List all yields | GET /v1/yields | GET /v1/yields | Now paginated; validators no longer embedded. Adds full argument schema (mechanics.arguments) + Improved interface |
| Single-yield metadata | GET /v1/yields/{yieldId} | GET /v1/yields/{yieldId} | Same as above |
| Validator list | GET /v1/yields/{yieldId}/validators | GET /v1/yields/{yieldId}/validators | Improved interface |
| Networks | GET /v1/yields/networks | GET /v1/networks | Improved interface |
| Providers | — | GET /v1/providers | Added ability to discover providers |
3. Actions & Transaction Workflow
Entering a Yield
Legacy — POST /v1/actions/enter- Send payload with nested addresses and custom fields.
- Response: action ID + list of transaction IDs.
- For each ID call
PATCH /v1/transactions/{id}to fetch unsigned tx. - Sign, broadcast, then submit hash per transaction.
ActionDto containing every TransactionDto in order, fully populated and annotated. Sign, broadcast, then PUT /v1/transactions/{transactionId}/submit-hash to report each hash. No extra construct calls.
Exiting / Unstaking
- Legacy —
POST /v1/actions/exitfollowed by per-transaction construct calls. - New — Same endpoint path, same one-shot transaction return pattern.
Manage Actions (claims, restakes, redelegations)
| Legacy (v1) | New (v2) |
|---|---|
POST /v1/actions/pending with "action": "CLAIM_REWARDS", plus the passthrough blob supplied by the balance endpoint. | POST /v1/actions/manage with "action": "CLAIM_REWARDS" in arguments, plus the passthrough blob supplied by the balance endpoint. |
| Construct transactions one by one | Same one-shot transaction return pattern. |
4. Balances
| Purpose | Legacy Endpoint | New Endpoint | Notes |
|---|---|---|---|
| Batch balances | POST /v1/yields/balances | POST /v1/yields/balances | More advanced request: See docs for details |
| Single balance | — (POST only) | POST /v1/yields/{yieldId}/balances | Dedicated endpoint for single yield |
5. Before / After Quick Reference
| Step | Legacy v1 | New v2 |
|---|---|---|
| Fetch validators for Cosmos staking | GET /v1/yields/cosmos-atom-native-staking (validators inline) | GET /v1/yields/cosmos-atom-native-staking/validators |
| Stake 100 ATOM | POST /v1/actions/enter → multiple PATCH /transactions/{id} | POST /v1/actions/enter → ready-to-sign tx list returned directly |
| Claim rewards | POST /v1/actions/pending with "action":"CLAIM_REWARDS" and passthrough | POST /v1/actions/manage with "action":"CLAIM_REWARDS" in args |
6. Additional Notable Changes
- Hostname has moved from
api.stakek.ittoapi.yield.xyz. - Terminology:
integrationId→yieldId; “pending actions” → manage actions. - Pagination: large lists (yields, validators) return
limitandoffset. - Error clarity: validation errors now cite the exact missing or malformed field.
7. Detailed Side-by-Side Comparison of Naming and DTOs
YieldDto Comparison
- API 1.0 (Legacy)
- API 2.0 (Current)
- Schema-driven arguments – v2 introduces structured
mechanics.argumentsfor enter, exit, and manage actions - Top-level token definitions – v2 exposes
inputTokensandtokenat the root - Normalized reward rate format –
rewardRatein v2 includes detailed breakdown viacomponents[] - Separated metadata and mechanics – v2 cleanly separates UI-facing display data from execution logic
YieldBalanceDto Comparison
- API 1.0 (Legacy)
- API 2.0 (Current)
- Unified Lifecycle States – v2 replaces
"staked","rewards"with consistent types:active,claimable,withdrawable,entering,exiting,locked - Flattened Balance Structure – v2 eliminates grouped balances in favor of flat positions
- Simplified Amount Handling – v2 standardizes on
amount,amountRaw, andamountUsd - Embedded Validator Metadata – v2 includes full validator metadata directly on each balance
ActionDto Comparison (Enter-Stake Flow)
- API 1.0 Request
- API 2.0 Request
- API 1.0 Response
- API 2.0 Response
PATCH /transaction/{id} per transaction step to get the unsignedTransaction- Schema-driven requests – v2 replaces nested
argswith top-levelargumentsobject - Unified action structure – All actions return same
ActionDtoformat withintent,type,yieldId - Transactions included by default – v2 embeds
unsignedTransaction,structuredTransaction,annotatedTransactiondirectly - Gas estimates and step metadata – Each transaction includes
gasEstimate,stepIndex, andtitle
Migration Tips
Drive everything from the schema
Always pull
GET /v1/yields/{id} and build your request exactly as that schema dictates.Remove transaction construction logic
No need to construct transactions via endpoint one by one anymore. Simply create the action, sign and submit each transaction!
Developer Update Checklist
Rename & Map Fields
Switch to
yieldId, metadata.*, rewardRate.*, lifecycle typeGenerate UI from Schema
Read
yield.mechanics.arguments to create forms; note validatorAddress (string) vs validatorAddresses (array)Fetch Validators Separately
Use
/validators endpoint - no inline arraysUse Balance Lifecycle
Drive labels/buttons from
balance.type and pendingActionsSimplify Actions
One create-action call → sign each
TransactionDto → PUT /submit-hash; no construct-tx calls neededUpdate Types
Update TypeScript interfaces to match new DTO structures
Support
If you need help migrating, contact hello@yield.xyz.Next Steps
API Reference
Current API documentation
Quickstart
Get started with v2

