Actions

Manage a yield

Generate the transactions needed to perform management actions on a yield position.

post/v1/actions/manage

Request

  • Base URL: https://api.yield.xyz
  • URL: https://api.yield.xyz/v1/actions/manage
  • Auth: API key in header x-api-key

Request body

yieldIdstring required

Yield ID to perform the action on

addressstring required

User wallet address

action'STAKE' | 'UNSTAKE' | 'WITHDRAW_REQUEST' | 'INSTANT_WITHDRAW' | 'CLAIM_REWARDS' | 'AUTO_SWEEP_UNSTAKE_REWARDS' | 'AUTO_SWEEP_WITHDRAW_REWARDS' | 'RESTAKE_REWARDS' | 'WITHDRAW' | 'WITHDRAW_ALL' | 'RESTAKE' | 'CLAIM_UNSTAKED' | 'UNLOCK_LOCKED' | 'STAKE_LOCKED' | 'VOTE' | 'REVOKE' | 'VOTE_LOCKED' | 'REVOTE' | 'REBOND' | 'MIGRATE' | 'VERIFY_WITHDRAW_CREDENTIALS' | 'DELEGATE' required

Pending action type (required for manage actions)

passthroughstring required

Server-generated passthrough from the balances endpoint (required for manage actions)

Example request

{
  "yieldId": "ethereum-eth-lido-staking",
  "address": "0x1234...",
  "arguments": {
    "amount": "1.500000",
    "amountRaw": "1000000000000000000",
    "amounts": [
      "1.500000",
      "2.000000"
    ],
    "shareAmount": "1.500000",
    "shareAmountRaw": "1500000",
    "validatorAddress": "cosmosvaloper1...",
    "validatorAddresses": [
      "cosmosvaloper1...",
      "cosmosvaloper2..."
    ],
    "providerId": "kiln",
    "duration": 1209600,
    "inputToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "outputToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "subnetId": 1,
    "feeConfigurationId": "custom-fee-config-1",
    "cosmosPubKey": "cosmospub1...",
    "tezosPubKey": "edpk...",
    "cAddressBech": "0x123...",
    "pAddressBech": "P-avax1...",
    "executionMode": "individual",
    "ledgerWalletApiCompatible": true,
    "useMaxAmount": true,
    "useInstantExecution": true,
    "useAutoClaim": true,
    "useMaxAllowance": true,
    "feePayerAddress": "7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo",
    "rangeMin": "0.0",
    "rangeMax": "1.0",
    "percentage": 50,
    "tokenId": "12345"
  },
  "action": "CLAIM_REWARDS",
  "passthrough": "eyJhZGRyZXNzZXMiOnsiYWRkcmVzcyI6ImNvc21vczF5ZXk..."
}

Response

Returns action with array of transactions to execute

idstring required

Unique action identifier

intent'enter' | 'manage' | 'exit' required

High-level action intent

type'STAKE' | 'UNSTAKE' | 'WITHDRAW_REQUEST' | 'INSTANT_WITHDRAW' | 'CLAIM_REWARDS' | 'AUTO_SWEEP_UNSTAKE_REWARDS' | 'AUTO_SWEEP_WITHDRAW_REWARDS' | 'RESTAKE_REWARDS' | 'WITHDRAW' | 'WITHDRAW_ALL' | 'RESTAKE' | 'CLAIM_UNSTAKED' | 'UNLOCK_LOCKED' | 'STAKE_LOCKED' | 'VOTE' | 'REVOKE' | 'VOTE_LOCKED' | 'REVOTE' | 'REBOND' | 'MIGRATE' | 'VERIFY_WITHDRAW_CREDENTIALS' | 'DELEGATE' required

Specific action type

yieldIdstring required

Yield ID this action belongs to

addressstring required

User wallet address

amountstring nullable required

Amount involved in the action, in human-readable token units (not the smallest denomination).

amountRawstring nullable required

Raw smallest-denomination amount (full precision)

amountUsdstring nullable required

USD value of the amount

entryReserveEstimatestring

Total SOL side-reserve required for enter validation: account rent plus ~0.005 SOL priority-fee buffer. For max native-SOL deposit use balance minus this value; do not also subtract amount. Only returned on the enter action creation response; omitted for exits, manage actions, and action retrieval.

executionPattern'synchronous' | 'asynchronous' | 'batch' required

Transaction execution pattern - synchronous (submit one by one, wait for each), asynchronous (submit all at once), or batch (single transaction with multiple operations)

createdAtstring date-time required

When the action was created

completedAtstring date-time nullable required

When the action was completed

status'CANCELED' | 'CREATED' | 'WAITING_FOR_NEXT' | 'PROCESSING' | 'FAILED' | 'SUCCESS' | 'STALE' required

Current status of the action

Example response

{
  "id": "action_123abc",
  "intent": "manage",
  "type": "CLAIM_REWARDS",
  "yieldId": "ethereum-eth-lido-staking",
  "address": "0x1234...",
  "amount": "1.0",
  "amountRaw": "1000000000000000000",
  "amountUsd": "1500.50",
  "transactions": [
    {
      "id": "tx_123abc",
      "title": "Approve USDC",
      "network": "ethereum",
      "status": "PENDING",
      "type": "STAKE",
      "hash": "0x1234567890abcdef...",
      "annotatedTransaction": {
        "method": "stake",
        "inputs": {
          "amount": "1000000000000000000"
        }
      },
      "description": "Approve USDC for staking",
      "gasEstimate": "21000",
      "explorerUrl": "https://etherscan.io/tx/0x1234..."
    }
  ],
  "events": [
    {
      "id": "event_123abc",
      "type": "REDEMPTION_SETTLED"
    }
  ],
  "executionPattern": "synchronous",
  "rawArguments": {
    "amount": "1.500000",
    "amountRaw": "1000000000000000000",
    "amounts": [
      "1.500000",
      "2.000000"
    ],
    "shareAmount": "1.500000",
    "shareAmountRaw": "1500000",
    "validatorAddress": "cosmosvaloper1...",
    "validatorAddresses": [
      "cosmosvaloper1...",
      "cosmosvaloper2..."
    ],
    "providerId": "kiln",
    "duration": 1209600,
    "inputToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "outputToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "subnetId": 1,
    "feeConfigurationId": "custom-fee-config-1",
    "cosmosPubKey": "cosmospub1...",
    "tezosPubKey": "edpk...",
    "cAddressBech": "0x123...",
    "pAddressBech": "P-avax1...",
    "executionMode": "individual",
    "ledgerWalletApiCompatible": true,
    "useMaxAmount": true,
    "useInstantExecution": true,
    "useAutoClaim": true,
    "useMaxAllowance": true,
    "feePayerAddress": "7Qo3awoTH4y5Vui1FQwsncq2arYDzUuivdeWhwgnAvVo",
    "rangeMin": "0.0",
    "rangeMax": "1.0",
    "percentage": 50,
    "tokenId": "12345"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.