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.
Manage Position
Generate the transactions needed to perform management actions on an existing yield position. This includes claiming rewards, restaking rewards, claiming unstaked tokens after cooldown, rebonding, voting, and other position lifecycle operations.When to Use
Activate this skill when the user asks to:- Claim staking rewards (e.g., “Claim my ATOM rewards”)
- Restake/compound rewards (e.g., “Restake my Cosmos rewards”)
- Claim unstaked tokens after cooldown (e.g., “Claim my unstaked DOT”)
- Rebond unstaking tokens (cancel unstake)
- Vote or re-vote with staked tokens
- Migrate a position
- Perform any maintenance on an existing position
Authentication
Base URL
Step-by-Step Instructions
Step 1: Check Current Position and Available Actions
First, check the user’s balances to see what management actions are available:rewards> 0 →CLAIM_REWARDSorRESTAKE_REWARDSavailableunstaked> 0 →CLAIM_UNSTAKEDavailableunstaking> 0 →REBONDmay be availablelocked> 0 →UNLOCK_LOCKEDmay be availablestaked> 0 →VOTE,REVOTEmay be available
Step 2: Determine the Management Action
| Action | Description | When to Use |
|---|---|---|
CLAIM_REWARDS | Claim accumulated staking/yield rewards | User has claimable rewards |
RESTAKE_REWARDS | Auto-compound rewards back into the position | User wants to restake rewards |
CLAIM_UNSTAKED | Claim tokens after cooldown period completes | Unstaking cooldown has ended |
REBOND | Cancel an unstaking request and restake | User changed their mind about unstaking |
UNLOCK_LOCKED | Unlock locked tokens | Locked tokens ready for unlock |
STAKE_LOCKED | Stake locked tokens | User has locked tokens to stake |
VOTE | Vote with staked tokens | Governance voting |
VOTE_LOCKED | Vote with locked tokens | Governance with locked tokens |
REVOTE | Change vote | Update existing vote |
MIGRATE | Migrate position to new contract/version | Protocol migration required |
WITHDRAW | Withdraw specific balance type | After unlock or claim |
DELEGATE | Re-delegate to different validator | User wants to switch validators |
VERIFY_WITHDRAW_CREDENTIALS | Verify ETH withdrawal credentials | Ethereum staking setup |
Step 3: Create the Manage Action
Endpoint:POST /v1/actions/manage
Request Body (CreateManageActionDto):
action field is required and must be one of the action types listed above.
Example: Claim rewards
Step 4: Sign and Submit Transactions
For each transaction in the response:- Sign the
unsignedTransaction - Broadcast to the blockchain
- Submit the hash:
Step 5: Verify Completion
Common Workflows
Claim and Restake Rewards (Compound)
- Check balances → confirm
rewards> 0 - Call
POST /v1/actions/managewithaction: "RESTAKE_REWARDS" - Sign and submit transactions
- Rewards are automatically re-deposited into the yield
Claim Unstaked After Cooldown
- Check balances → confirm
unstaked> 0 (cooldown must be complete) - Call
POST /v1/actions/managewithaction: "CLAIM_UNSTAKED" - Sign and submit transactions
- Tokens are returned to the user’s wallet
Switch Validators (Redelegate)
- Query available validators:
GET /v1/yields/{yieldId}/validators - Call
POST /v1/actions/managewithaction: "DELEGATE"and the newvalidatorAddress - Sign and submit
Error Handling
| Status Code | Meaning | Action |
|---|---|---|
| 400 | Invalid action or parameters | Verify the action type is supported for this yield; check balance types |
| 401 | Unauthorized | Verify API key |
| 403 | Geoblocked | User’s region is restricted |
| 404 | Yield or position not found | Verify yield ID and user address |
| 429 | Rate limited | Wait and retry |
Edge Cases
- No rewards to claim: If
rewardsbalance is 0,CLAIM_REWARDSwill return a 400. Always check balances first. - Cooldown not complete:
CLAIM_UNSTAKEDwill fail if the cooldown period hasn’t elapsed. Check the balance’scompletionDatefield. - Action not supported: Not all manage actions are available for all yields. Lending protocols may not support
CLAIM_REWARDS. Check the yield metadata. - Validator required: For staking yields, most manage actions require
validatorAddressin the arguments. - Multiple validators: If the user is staked with multiple validators, manage actions may need to be called per validator.
- Minimum claim amount: Polygon native staking requires > 1 POL in claimable rewards before claiming is allowed.

