> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# yieldIntegrations.yieldxyz.enter

> Enter a yield position.

## Function Signature

```dart theme={null}
Future<YieldXyzActionResponse> enter({
  required String yieldId,
  String? address,
  String? amount,
  String? arguments,
})
```

## 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

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

final response = await portal.yieldIntegrations.yieldxyz.enter(
  yieldId: 'aave-v3-usdc-ethereum',
  amount: '100.0',
);

print('Action ID: ${response.id}');
print('Transactions to sign: ${response.transactions.length}');
```

## Errors

| Code              | Description                    |
| ----------------- | ------------------------------ |
| `NOT_INITIALIZED` | Portal was not initialized     |
| `YIELD_FAILED`    | Failed to enter yield position |

## Related

* [Earn with Yield.xyz guide](../guide/yield-xyz)
* [yieldIntegrations.yieldxyz.discover](./yield-discover)
* [yieldIntegrations.yieldxyz.exit](./yield-exit)
* [yieldIntegrations.yieldxyz.track](./yield-track)
