Function Signature
Description
Deposit assets into a yield-generating opportunity.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
yieldId | String | Yes | The ID of the yield opportunity to enter |
address | String? | No | Wallet address (defaults to current wallet) |
amount | String? | No | Amount to deposit |
arguments | String? | No | Additional protocol-specific arguments as JSON string |
Returns
YieldXyzActionResponse - An object containing:
| Property | Type | Description |
|---|---|---|
id | String | Action ID for tracking |
intent | YieldXyzActionIntent | Action intent (enter, exit, manage) |
type | String | Action type |
yieldId | String | The yield opportunity ID |
address | String | Wallet address used |
amount | String? | Deposit amount |
amountRaw | String? | Raw deposit amount |
amountUsd | String? | USD equivalent amount |
transactions | List<YieldXyzActionTransaction?> | List of transactions to be signed and broadcast |
executionPattern | YieldXyzActionExecutionPattern | Execution pattern (synchronous, asynchronous, batched) |
createdAt | String | Creation timestamp |
completedAt | String? | Completion timestamp |
status | YieldXyzActionStatus | Current status (created, processing, success, failed, canceled, waitingForNext, stale) |
Example
Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
YIELD_FAILED | Failed to enter yield position |