Skip to main content

Overview

This guide covers reading fungible tokens on Solana: account balances, token accounts by owner or mint, total supply, largest holders, and the DAS fungible token extension. Helius exposes both standard Solana RPC token methods and DAS methods that add metadata and USD prices. For NFTs, compressed NFTs, editions, and proofs, see the Get Assets guide. This page focuses on fungible (SPL and Token-2022) tokens.

When to use this

Use the methods on this page when you are:
  • Reading the balance of a single token account
  • Listing every token account a wallet holds
  • Finding all accounts that hold a specific mint
  • Checking a token’s total supply or its largest holders
  • Fetching token metadata and USD price alongside balances

Token account balance

Get the balance for a specific token account using standard RPC:
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getTokenAccountBalance',
    params: [
      '3emsAVdmGKERbHjmGfQ6oZ1e35dkf5iYcS6U4CPKFVaa'
    ]
  })
});
const data = await response.json();
console.log(data);

API Reference

getTokenAccountBalance

Token accounts by owner

List all token accounts owned by a wallet:
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getTokenAccountsByOwner',
    params: [
      '86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY',
      {
        programId: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
      },
      {
        encoding: 'jsonParsed'
      }
    ]
  })
});
const data = await response.json();
console.log(data);

API Reference

getTokenAccountsByOwner

Token accounts by mint

List all accounts holding a specific token:
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getTokenAccountsByOwner',
    params: [
      'CEXq1uy9y15PL2Wb4vDQwQfcJakBGjaAjeuR2nKLj8dk',
      {
        mint: "8wXtPeU6557ETkp9WHFY1n1EcU6NxDvbAggHGsMYiHsB"
      },
      {
        encoding: 'jsonParsed'
      }
    ]
  })
});
const data = await response.json();
console.log(data);

API Reference

getTokenAccountsByOwner
To find every account holding a mint across all owners (not just one owner), use the DAS getTokenAccounts method described below.

Token supply

Check the total supply of a token:
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getTokenSupply',
    params: [
      'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    ]
  })
});
const data = await response.json();
console.log(data);

API Reference

getTokenSupply

Largest token holders

Identify the largest accounts holding a token:
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getTokenLargestAccounts',
    params: [
      'he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A'
    ]
  })
});
const data = await response.json();
console.log(data);

API Reference

getTokenLargestAccounts
Returns up to the 20 largest accounts for the mint:
{
  "context": { "slot": 0 },
  "value": [
    { "address": "...", "amount": "1000000000000", "decimals": 9, "uiAmount": 1000.0, "uiAmountString": "1000" }
  ]
}

Token accounts with the DAS API

The DAS getTokenAccounts method returns token accounts by mint or owner, including balances, in a single paginated call. Unlike getTokenAccountsByOwner, you can query by mint alone to list every account holding a token across all owners.
const url = `https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY`;

const getTokenAccounts = async (params) => {
  const response = await fetch(url, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      jsonrpc: "2.0",
      id: "my-request-id",
      method: "getTokenAccounts",
      params: params,
    }),
  });

  const { result } = await response.json();
  return result;
};

// Example: Get all accounts holding a specific token
getTokenAccounts({
  mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", // USDC
  page: 1,
  limit: 100
});

API Reference

getTokenAccounts
Paginated; each entry includes the account, mint, owner, and balance:
{
  "total": 100,
  "limit": 100,
  "page": 1,
  "token_accounts": [
    { "address": "...", "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "owner": "...", "amount": 12345678 }
  ]
}

Token metadata and price with the DAS API

For token metadata and USD price, call the DAS getAsset method with showFungible enabled. Prices for verified tokens are returned under token_info.price_info.
Price data from getAsset is cached for up to 600 seconds, so it can be up to 10 minutes old.
const response = await fetch("https://mainnet.helius-rpc.com/?api-key=YOUR_API_KEY", {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    jsonrpc: '2.0',
    id: '1',
    method: 'getAsset',
    params: {
      id: 'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263', // Bonk
      options: {
        showFungible: true
      }
    }
  })
});
const { result } = await response.json();
console.log(result.token_info.price_info);

API Reference

getAsset
The response returns supply, decimals, and price under token_info:
{
  "token_info": {
    "symbol": "Bonk",
    "supply": 8881594973561640000,
    "decimals": 5,
    "token_program": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
    "price_info": {
      "price_per_token": 0.0000192271,
      "currency": "USDC"
    }
  }
}

Calculate market cap

Multiply the price by the decimal-adjusted supply:
const { price_per_token } = result.token_info.price_info;
const { supply, decimals } = result.token_info;
const marketCap = (supply / Math.pow(10, decimals)) * price_per_token;
To list every fungible token in a wallet (with balances and prices) in one call, use getAssetsByOwner or searchAssets with tokenType: "fungible". See the fungible token extension for how tokenType, balances, Token-2022 extensions, and price data appear in the response.

Best practices

  • Use pagination for methods that return large result sets. See the Pagination guide.
  • Prefer DAS methods (getAsset, getAssetsByOwner, getTokenAccounts) when you need metadata or USD prices; use standard RPC methods for raw on-chain balances and supply.
  • Handle errors gracefully with try/catch blocks and retries.
  • Cache responses when appropriate to reduce API calls.

Next steps

Fungible Token Extension

How DAS returns fungible tokens, Token-2022 extensions, and prices.

Get Assets (NFTs)

Retrieve NFTs, compressed NFTs, editions, and proofs.

DAS API reference

Full schemas for every DAS method.