Skip to main content
POST
YieldCreateEnterAction generates unsigned deposit transaction calldata for a yield market.

Overview

YieldCreateEnterAction returns the unsigned transaction payload needed to deposit into a DeFi yield market. This is the low-level endpoint that backs the lend and deposit composable actions in the SDK. Use this endpoint when building custom DeFi UIs outside React, or when you need to construct the calldata manually before passing it to Trails via the to.calldata param on QuoteIntent. For React apps, use the lend() or deposit() action builders with useTrailsSendTransaction — they call this endpoint internally.

Request Parameters

Response

Returns payload containing unsigned transaction data:

Examples

Build a deposit calldata for Aave

With protocol-specific arguments

Some markets accept additional arguments (e.g. slippage, referral codes):

SDK alternative

For React, use the lend or deposit builders with useTrailsSendTransaction:
See Composable Actions for the full SDK approach.

See also

Body

application/json
earnMarketId
string
required

Market ID from YieldGetMarkets

userWalletAddress
string
required

Wallet address of the user performing the action

args
object

Optional market-specific arguments (e.g. referral codes, slippage)

Response

OK

payload
object
required

JSON object containing unsigned transaction payloads