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

# getPerformance

> Returns the indexed performance of an owner's Earn vault position

## Function Signature

```typescript theme={"system"}
client.earn.getPerformance(params: {
  vaultId: string;
  ownerAddress: string;
  traceContext?: TraceContext;
}): Promise<EarnVaultPositionPerformance>
```

## Description

Returns the indexed performance of an owner's position in an [Earn](https://www.dynamic.xyz/docs/earn/overview.md) vault, including profit-and-loss fields such as `pnl` and `pnlUsd`. The data comes from the indexer, so it trails the chain head.

Available as `client.earn` on `DynamicEvmWalletClient` and `DynamicSvmWalletClient`.

> [!NOTE]
>
> Aave vaults reject performance requests with an HTTP 400 error. This is a provider limitation,
> not a bug. See [Provider support](https://www.dynamic.xyz/docs/earn/overview.md#provider-support).

## Parameters

### Required Parameters

* **`vaultId`** (`string`): The vault identifier from [`listVaults`](https://www.dynamic.xyz/docs/node/reference/earn/list-vaults).
* **`ownerAddress`** (`string`): The wallet address that owns the position.

### Optional Parameters

* **`traceContext`** (`TraceContext`): Trace context forwarded to the Dynamic API.

## Returns

* **`Promise<EarnVaultPositionPerformance>`**: The position's indexed performance. Amounts are raw-unit strings.

## Example

```typescript theme={"system"}
import { authenticatedEvmClient } from './client';

const evmClient = await authenticatedEvmClient();

const performance = await evmClient.earn.getPerformance({
  vaultId: 'steakhouse-prime-usdc',
  ownerAddress: walletMetadata.accountAddress,
});

console.log(`PnL: ${performance.pnlUsd} USD`);
```

## Error Handling

Fails with an HTTP 403 error when Earn is not enabled for your environment, or an HTTP 400 error when the vault's provider does not support performance lookups.

## See Also

* [Earn](https://www.dynamic.xyz/docs/node/earn.md)
* [getPosition](https://www.dynamic.xyz/docs/node/reference/earn/get-position.md)
* [getEarnings](https://www.dynamic.xyz/docs/node/reference/earn/get-earnings.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.