
Trading Automation
yield-agent
YieldAgent by Yield.xyz provides a unified API to discover and interact with on-chain yields across 80+ networks and 2,600+ instruments (staking, lending, vaults, restaking, liquidity pools).
Overview
YieldAgent by Yield.xyz provides a unified API to discover and interact with on-chain yields across 80+ networks and 2,600+ instruments (staking, lending, vaults, restaking, liquidity pools).
YieldAgent by Yield.xyz provides a unified API to discover and interact with on-chain yields across 80+ networks and 2,600+ instruments (staking, lending, vaults, restaking, liquidity pools). It exposes self-documenting YieldDto mechanics so integrators fetch exact argument schemas (enter/exit fields, entry limits, accepted input tokens, enum options and optionsRef) before building actions. Use it to search and compare APYs, build unsigned transactions for wallet signing, open/modify/exit positions, claim rewards, and manage portfolio allocations programmatically. Critical safety rules include never modifying any unsignedTransaction returned by the API — request a new action if amounts or gas are incorrect. Core advantages: broad DeFi coverage, standardized action schemas, explicit transaction safety guidance, and end-to-end programmatic position management for integrations and automation.
Skill.md
How this skill works
YieldAgent by Yield.xyz provides a unified API to discover and interact with on-chain yields across 80+ networks and 2,600+ instruments (staking, lending, vaults, restaking, liquidity pools).
YieldAgent by Yield.xyz
Access the complete on-chain yield landscape through Yield.xyz's unified API. Discover 2600+ yields across staking, lending, vaults, restaking, and liquidity pools. Build transactions and manage positions across 80+ networks.
CRITICAL: Never Modify Transactions From The API
DO NOT MODIFY
unsignedTransactionreturned by the API UNDER ANY CIRCUMSTANCES.Do not change, reformat, or "fix" any part of it — not addresses, amounts, fees, encoding, or any other field, on any chain.
If the amount is wrong: Request a NEW action from the API with the correct amount. If gas is insufficient: Ask the user to add funds, then request a NEW action. If anything looks wrong: STOP. Always request a new action with corrected arguments. Never attempt to "fix" an existing transaction.
Modifying
unsignedTransactionWILL RESULT IN PERMANENT LOSS OF FUNDS.
Key Rules
The API is self-documenting. Every yield describes its own requirements through the
YieldDto. Before taking any action, always fetch the yield and inspect it. Themechanicsfield tells you everything: what arguments are needed (mechanics.arguments.enter,.exit), entry limits (mechanics.entryLimits), and what tokens are accepted (inputTokens[]). Never assume — always check the yield first.
-
Always fetch the yield before calling an action. Call
GET /v1/yields/{yieldId}and readmechanics.arguments.enter(or.exit) to discover the exact fields required. Each yield is different — the schema is the contract. Do not guess or hardcode arguments.Each field in the schema (
ArgumentFieldDto) tells you:name: the field name (e.g.,amount,validatorAddress,inputToken)type: the value type (string,number,address,enum,boolean)required: whether it must be providedoptions: static choices for enum fields (e.g.,["individual", "batched"])optionsRef: a dynamic API endpoint to fetch choices (e.g.,/api/v1/validators?integrationId=...) — if present, call it to get the valid options (validators, providers, etc.)minimum/maximum: value constraintsisArray: whether the field expects an array
If a field has
optionsRef, you must call that endpoint to get the valid values. This is how validators, providers, and other dynamic options are discovered. -
For manage actions, always fetch balances first. Call
POST /v1/yields/{yieldId}/balancesand readpendingActions[]on each balance. Each pending action tells you itstype,passthrough, and optionalargumentsschema. Only call manage with values from this response. -
Amounts are human-readable.
"100"means 100 USDC."1"means 1 ETH."0.5"means 0.5 SOL. Do NOT convert to wei or raw integers — the API handles decimals internally. -
Set
inputTokento what the user wants to deposit — but only ifinputTokenappears in the yield'smechanics.arguments.enterschema. The API handles the full flow (swaps, wrapping, routing) to get the user into the position. -
ALWAYS submit the transaction hash after broadcasting — no exceptions. For every transaction: sign, broadcast, then submit the hash via
PUT /v1/transactions/{txId}/submit-hashwith{ "hash": "0x..." }. Balances will not appear until the hash is submitted. This is the most common mistake — do not skip this step. -
Execute transactions in exact order. If an action has multiple transactions, they are ordered by
stepIndex. Wait forCONFIRMEDbefore proceeding to the next. Never skip or reorder. -
Consult
{baseDir}/references/openapi.yamlfor types. All enums, DTOs, and schemas are defined there. Do not hardcode values.
Quick Start
# Discover yields on a network
./scripts/find-yields.sh base USDC
# Inspect a yield's schema before entering
./scripts/get-yield-info.sh base-usdc-aave-v3-lending
# Enter a position (amounts are human-readable)
./scripts/enter-position.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS '{"amount":"100"}'
# Check balances and pending actions
./scripts/check-portfolio.sh base-usdc-aave-v3-lending 0xYOUR_ADDRESS
Scripts
| Script | Purpose |
|---|---|
find-yields.sh | Discover yields by network/token |
get-yield-info.sh | Inspect yield schema, limits, token details |
list-validators.sh | List validators for staking yields |
enter-position.sh | Enter a yield position |
exit-position.sh | Exit a yield position |
manage-position.sh | Claim, restake, redelegate, etc. |
check-portfolio.sh | Check balances and pending actions |
Common Patterns
Enter a Position
- Discover yields:
find-yields.sh base USDC - Inspect the yield:
get-yield-info.sh <yieldId>— readmechanics.arguments.enter - Enter:
enter-position.sh <yieldId> <address> '{"amount":"100"}' - For each transaction: wallet signs → broadcast → submit hash → wait for CONFIRMED
Manage a Position
- Check balances:
check-portfolio.sh <yieldId> <address> - Read
pendingActions[]— each has{ type, passthrough, arguments? } - Manage:
manage-position.sh <yieldId> <address> <action> <passthrough>
Full Lifecycle
- Discover → 2. Enter → 3. Check balances → 4. Claim rewards → 5. Exit
Transaction Flow
After any action (enter/exit/manage), the response contains transactions[]. For EACH transaction:
- Pass
unsignedTransactionto wallet skill for signing and broadcasting - Submit the hash —
PUT /v1/transactions/{txId}/submit-hashwith{ "hash": "0x..." } - Poll
GET /v1/transactions/{txId}untilCONFIRMEDorFAILED - Proceed to next transaction
Every transaction must follow this flow. Example with 3 transactions:
TX1: sign → broadcast → submit-hash → poll until CONFIRMED
TX2: sign → broadcast → submit-hash → poll until CONFIRMED
TX3: sign → broadcast → submit-hash → poll until CONFIRMED
unsignedTransaction format varies by chain. See {baseDir}/references/chain-formats.md for details.
API Endpoints
All endpoints documented in {baseDir}/references/openapi.yaml. Quick reference:
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/yields | List yields (with filters) |
| GET | /v1/yields/{yieldId} | Get yield metadata (schema, limits, tokens) |
| GET | /v1/yields/{yieldId}/validators | List validators |
| POST | /v1/actions/enter | Enter a position |
| POST | /v1/actions/exit | Exit a position |
| POST | /v1/actions/manage | Manage a position |
| POST | /v1/yields/{yieldId}/balances | Get balances for a yield |
| POST | /v1/yields/balances | Aggregate balances across yields/networks |
| PUT | /v1/transactions/{txId}/submit-hash | Submit tx hash after broadcasting |
| GET | /v1/transactions/{txId} | Get transaction status |
| GET | /v1/networks | List all supported networks |
| GET | /v1/providers | List all providers |
References
Detailed reference files — read on demand when you need specifics.
- API types and schemas:
{baseDir}/references/openapi.yaml— source of truth for all DTOs, enums, request/response shapes - Chain transaction formats:
{baseDir}/references/chain-formats.md—unsignedTransactionencoding per chain family (EVM, Cosmos, Solana, Substrate, etc.) - Wallet integration:
{baseDir}/references/wallet-integration.md— Crossmint, Portal, Turnkey, Privy, signing flow - Agent conversation examples:
{baseDir}/references/examples.md— 10 conversation patterns with real yield IDs - Safety checks:
{baseDir}/references/safety.md— pre-execution checks, constraints
Error Handling
The API returns structured errors with message, error, and statusCode. Read the message. Error shapes are in {baseDir}/references/openapi.yaml. Respect retry-after on 429s.
Add-on Modules
Modular instructions that extend core functionality. Read when relevant.
Best used for
When to use it
YieldAgent by Yield.xyz provides a unified API to discover and interact with on-chain yields across 80+ networks and 2,600+ instruments (staking, lending, vaults, restaking, liquidity pools).

01 · PRE-MEETING
Prepare a decision brief
Turn scattered evidence into a structured case before an investment committee meeting.

02 · TEAM WORKFLOW
Standardize handoffs
Create consistent research outputs across analysts, portfolio managers, and agents.

03 · LIVE UPDATE
Refresh the thesis
Update scenarios after a new catalyst, KPI release, or earnings result.
Community notes
Built to improve with use.
Feedback will appear here as this skill is used and reviewed.
Discover more
Related skills
View allquant-analysis
Quantitative Analysis Skill provides an end-to-end toolkit for quantitative finance research and production analysis. It automates data ingestion, interactive analysis in Jupyter (jupyter_execute,…
bankr
Bankr enables executing crypto trading and DeFi operations via natural-language commands. It offers two integration options: a batteries-included Bankr CLI and a REST API at https://api.bankr.bot,…
pine-backtester
pine-backtester provides comprehensive backtesting for Pine Script indicators and strategies. Use it to append performance metrics, analyze trades, generate equity curves, compute win rates, track…