Skip to main content

Documentation Index

Fetch the complete documentation index at: https://helius-codex-token-transfer-filter-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Solana’s SPL token ecosystem is vast, and Helius provides multiple APIs to efficiently query token data.

Basic Token Account Information

Get balance for a specific token account using 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

Finding 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

Finding 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

Getting 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

Finding Large 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

Advanced Token Data with DAS API

For more comprehensive token information including metadata:
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: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
      options: {
        showFungible: true
      }
    }
  })
});
const data = await response.json();
console.log(data);

API Reference

getAsset