Actions
Enter a yield
Generate the transactions needed to enter a yield position with the provided parameters.
post/v1/actions/enter
Request
- Base URL: https://api.yield.xyz
- URL: https://api.yield.xyz/v1/actions/enter
- Auth: API key in header x-api-key
Request body
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"
}
}Response
Returns action with array of transactions to execute
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.