Generate unsigned withdrawal transaction calldata for a DeFi yield position
Documentation Index
Fetch the complete documentation index at: https://docs.trails.build/llms.txt
Use this file to discover all available pages before exploring further.
YieldCreateExitAction returns the unsigned transaction payload needed to withdraw from a DeFi yield position. It is the counterpart to YieldCreateEnterAction.
Use this endpoint to build withdrawal UIs or construct exit calldata for Trails routes. For React apps, the composable action builders handle this automatically.
| Field | Type | Required | Description |
|---|---|---|---|
earnMarketId | string | Yes | Market ID from YieldGetMarkets |
userWalletAddress | string | Yes | Address of the withdrawing wallet |
args | object | No | Market-specific arguments (e.g. amount, shares) |
payload 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 withdrawals) |
args to pass withdrawal parameters for markets that require them (e.g. partial withdrawals):
OK
JSON object containing unsigned transaction payloads