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

# getAvailableProtocols

Get available DeFi protocols and pools for a specific chain with APY data.

## Signature

```typescript theme={null}
getAvailableProtocols(chainId: SupportedChainId): Promise<ProtocolsResponse>
```

## Parameters

| Parameter | Type               | Required | Description     |
| --------- | ------------------ | -------- | --------------- |
| `chainId` | `SupportedChainId` | ✅        | Target chain ID |

## Returns

List of available protocols with pools and APY data

## Return Type

```typescript theme={null}
interface ProtocolsResponse {
  success: boolean;
  chainId: SupportedChainId;
  protocols: Protocol[];
}
```

## Example

```typescript theme={null}
const protocols = await sdk.getAvailableProtocols(42161);
protocols.protocols.forEach((protocol) => {
  console.log(`${protocol.name} (ID: ${protocol.id})`);
  if (protocol.pools) {
    protocol.pools.forEach((pool) => {
      console.log(`  Pool: ${pool.name} - APY: ${pool.apy || "N/A"}%`);
    });
  }
});
```
