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

# Get Tokens

> Retrieve supported tokens and their information using the DZap SDK

> Access token information across all supported chains, including metadata and availability.

The DZap SDK provides powerful token discovery and information retrieval capabilities, allowing you to access detailed information about thousands of tokens across multiple blockchain networks.

## Basic Token Retrieval

Get all supported tokens on a specific chain:

```typescript theme={null}
import { DZapClient } from "@dzapio/sdk";

const dZap = DZapClient.getInstance();

// getAllTokens(chainId, source?, account?) - returns TokenResponse (object keyed by token address)
const arbitrumTokens = await dZap.getAllTokens(42161); // Arbitrum
// With optional source and account for balance/price
const tokensWithBalance = await dZap.getAllTokens(42161, undefined, userAddress);

console.log(`Found ${Object.keys(arbitrumTokens).length} tokens on Arbitrum`);

// Access by token address (return type is TokenResponse: Record<string, TokenInfo>)
const usdcToken = arbitrumTokens["0xaf88d065e77c8cC2239327C5EDb3A432268e5831"];
console.log("USDC Info:", usdcToken);
```

## Search Tokens by Symbol

Filter the token list to find specific tokens:

```typescript theme={null}
const arbitrumTokens = await dZap.getAllTokens(42161);

// Find all stablecoins by symbol
const stablecoins = Object.values(arbitrumTokens).filter((token) =>
  ["USDC", "USDT", "DAI", "FRAX"].includes(token.symbol)
);

stablecoins.forEach((token) => {
  console.log(`${token.symbol} (${token.name})`);
  console.log(`  Address: ${token.contract}`);
  console.log(`  Decimals: ${token.decimals}`);
  console.log(`  Price: $${token.price ?? "N/A"}`);
});
```

## Token Information Structure

Each token contains detailed information:

```typescript theme={null}
type TokenInfo = {
  contract: string; // Contract address (same as address)
  symbol: string; // Token symbol (e.g., "USDC")
  decimals: number; // Number of decimals
  name: string; // Full name (e.g., "USD Coin")
  balance: string; // User's balance (if account provided)
  price?: string; // Current price in USD
  logo: string; // Token logo URL
  chainId: number; // Chain ID where token exists
  balanceInUsd?: number | null; // USD value of user's balance
  isDisabledOnSwapBridge?: {
    source: boolean; // Disabled as source token
    destination: boolean; // Disabled as destination token
  };
  isDisabledOnZap?: {
    source: boolean; // Disabled for zap operations
    destination: boolean;
  };
  permit?: {
    eip2612: { supported: boolean; data?: { domain?: unknown } };
    permit2: { supported: boolean };
  };
};
```

## Next Steps

* [Get Token Balances](/sdk/tokens/token-balances) - Retrieve user token balances
* [Get Token Prices](/sdk/tokens/token-prices) - Access real-time token pricing
