v1

latestOpenAPI 3.0.02026-07-2442138225.7 KB
Actions

Exit a yield

Generate the transactions needed to exit a yield position with the provided parameters.

post/v1/actions/exit

Request body

yieldIdstring required

Yield ID to perform the action on

addressstring required

User wallet address

Example request

{
  "yieldId": "ethereum-eth-lido-staking",
  "address": "0x1234...",
  "arguments": {
    "amount": "1.500000",
    "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"
  }
}

Response

Returns action with array of transactions to execute

idstring required

Unique action identifier (UUID)

integrationIdstring required

Integration identifier

action'supply' | 'borrow' | 'repay' | 'withdraw' | 'enableCollateral' | 'disableCollateral' required

Action type executed

addressstring required

User wallet address

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

Current action status

hasNextStepboolean required

Whether there are more transactions to sign after the current step completes. When true, call POST /actions/:id/step after confirming to get the next transaction(s). Used for async multi-step flows such as cross-chain bridges or delayed withdrawals.

currentStepnumber required

Current step number (1-indexed)

totalStepsnumber required

Total number of steps in this action. Most actions are single-step. Multi-step actions occur when an async operation (e.g., bridge confirmation) must complete before the next transaction can be constructed.

createdAtstring date-time required

When the action was created

Example response

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "integrationId": "aave-borrow",
  "action": "supply",
  "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28",
  "status": "CREATED",
  "transactions": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "network": "ethereum",
      "chainId": "1",
      "type": "SUPPLY",
      "status": "CREATED",
      "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fB28",
      "signingFormat": "EVM_TRANSACTION"
    }
  ],
  "currentStep": 1,
  "totalSteps": 1,
  "rawArguments": {
    "amount": "1.5",
    "amountRaw": "1500000",
    "repayAll": true,
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "collateralTokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
    "collateralAmount": "0.5",
    "collateralAmountRaw": "50000000",
    "borrowAmount": "100",
    "targetLtv": "0.1",
    "marketId": "morpho-blue-borrow-base-cbbtc-usdc-86"
  },
  "metadata": {
    "currentHealthFactor": "1.85",
    "predictedHealthFactor": "1.42",
    "currentLtv": "0.55",
    "predictedLtv": "0.72",
    "liquidationThreshold": "0.85",
    "predictedTotalSupplyUsd": "10000.00",
    "predictedTotalDebtUsd": "7200.00",
    "originationFeeBps": 100,
    "originationFeeAmount": "1.00",
    "effectivePrincipalAmount": "101.00",
    "feeAmount": "0.0005",
    "feeBps": 50,
    "effectiveCollateralAmount": "0.0125"
  }
}