YieldCreateEnterAction generates unsigned deposit transaction calldata for a yield market.
Earn
YieldCreateEnterAction
Generate unsigned deposit transaction calldata for a DeFi yield market
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
| Field | Type | Required | Description |
|---|---|---|---|
earnMarketId | string | Yes | Market ID from YieldGetMarkets |
userWalletAddress | string | Yes | Address of the depositing wallet |
args | object | No | Market-specific arguments (varies by protocol) |
Response
Returnspayload containing unsigned transaction data:
| Field | Description |
|---|---|
transactions | Array of transaction objects to execute |
transactions[].to | Contract address |
transactions[].data | ABI-encoded calldata |
transactions[].value | ETH value (for native token deposits) |
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 thelend or deposit builders with useTrailsSendTransaction:
See also
- YieldCreateExitAction — Withdraw from a position
- YieldGetMarkets — Discover market IDs
- Composable Actions — SDK builders for DeFi deposits
Body
application/json
Response
OK
JSON object containing unsigned transaction payloads