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

# listYieldVaults

# listYieldVaults

Lists the [Earn](https://docs.dynamic.xyz/docs/earn/overview.md) vaults available to the current environment, which is your Dynamic project, identified by the environment ID in **Developer Settings → SDK & API Keys**, and unrelated to which blockchain network a vault runs on. Public vaults are returned for every caller; private vaults (provisioned for a specific environment) are included only when they're scoped to the caller's environment. Each vault is enriched with live `netApy` and `tvlUsd` on a best-effort basis, and either field may be omitted if that data is temporarily unavailable.

> [!NOTE]
>
> Earn vaults run on EVM chains and on Solana. Read `chainName` to tell which, and pass the matching kind of wallet account to the other Earn functions. `chainId` is an EVM chain ID for an EVM vault and a Solana network ID for a Solana vault.

## Usage

```javascript theme={"system"}
import { listYieldVaults } from '@dynamic-labs-sdk/client';

const vaults = await listYieldVaults();

console.log(vaults[0].vaultId, vaults[0].netApy);
```

## Parameters

| Parameter | Type | Description |
| - | - | - |
| `client` | `DynamicClient` (optional) | The Dynamic client instance. Only required when using multiple Dynamic clients. |

## Returns

`Promise<YieldVaultSummary[]>` - The vaults accessible to this environment.

| Field | Type | Description |
| - | - | - |
| `vaultId` | `string` | Opaque identifier for the vault, issued by the Dynamic Console. |
| `curator` | `string` | Name of the organization or team that curates this vault. |
| `assetSymbol` | `string` | Ticker symbol of the underlying asset (e.g. `USDC`). |
| `assetAddress` | `string` | Address of the underlying asset token. |
| `chainId` | `number` | Chain ID where the vault is deployed. An EVM chain ID for an EVM vault, and a Solana network ID for a Solana vault. |
| `chainName` | `'EVM' \| 'SOL'` (optional) | The chain family the vault runs on. Use a wallet account from the same family for every Earn action on this vault. |
| `provider` | `'MORPHO' \| 'AAVE' \| 'KAMINO'` | The DeFi protocol that serves the vault. Handle values your code does not recognize. See [Provider support](https://docs.dynamic.xyz/docs/earn/overview.md#provider-support). |
| `netApy` | `number` (optional) | Net APY including reward incentives, as a decimal (e.g. `0.05` = 5%). Omitted when live data is unavailable. |
| `tvlUsd` | `number` (optional) | Total value locked, in USD. Omitted when live data is unavailable. |

## Examples

### List vaults and pick one by asset

```javascript theme={"system"}
import { listYieldVaults } from '@dynamic-labs-sdk/client';

const vaults = await listYieldVaults();

const usdcVaults = vaults.filter((vault) => vault.assetSymbol === 'USDC');

console.log(
  usdcVaults.map((vault) => `${vault.curator}: ${vault.netApy ?? 'n/a'}`)
);
```

## React

`useListYieldVaults` is a query hook that fetches on mount and returns the vaults in `data`.

```tsx theme={"system"}
import { useListYieldVaults } from '@dynamic-labs-sdk/react-hooks';

function VaultList() {
  const { data: vaults = [], isLoading } = useListYieldVaults();

  if (isLoading) {
    return <p>Loading vaults...</p>;
  }

  return (
    <ul>
      {vaults.map((vault) => (
        <li key={vault.vaultId}>
          {vault.assetSymbol} — {vault.curator} — {vault.netApy ?? 'n/a'}
        </li>
      ))}
    </ul>
  );
}
```

## Related

* [`getYieldDetails`](https://docs.dynamic.xyz/docs/javascript/reference/client/get-yield-details) - Full details for one vault
* [`getYieldPosition`](https://docs.dynamic.xyz/docs/javascript/reference/client/get-yield-position) - A wallet's position in a vault
* [`depositToYieldVault`](https://docs.dynamic.xyz/docs/javascript/reference/client/deposit-to-yield-vault) - Deposit into a vault


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