Specific Token Balance

Get the balance of a specific SPL token using the getTokenAccounts DAS API. Perfect for checking holdings of USDC, USDT, or any other token by mint address.

Try It

Default: USDC mint address

Code Example

// Get specific token balance for a wallet
import { Helius } from 'helius-sdk';

const helius = new Helius('YOUR_API_KEY');

async function getTokenBalance(owner: string, mint: string) {
const response = await helius.getTokenAccounts({
owner,
mint,
limit: 1
});

if (!response.token_accounts?.length) {
return { found: false };
}

const account = response.token_accounts[0];
return {
found: true,
amount: account.amount,
mint: account.mint
};
}

// Usage - Check USDC balance
const USDC_MINT = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
const balance = await getTokenBalance('86xCnPeV69n...', USDC_MINT);

Common Token Mints

Wrapped SOLSo11111111111111111111111111111111111111112
USDCEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
USDTEs9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
BONKDezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263
JUPJUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN

Frequently Asked Questions

How do I check if a wallet holds a specific token?
Use the getTokenAccounts DAS API with both the owner (wallet) address and the mint (token) address. If the response contains token_accounts, the wallet holds that token.
What is a mint address?
A mint address is the unique identifier for a token on Solana. For example, USDC has mint address EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v. You need this to query a specific token balance.
Why use getTokenAccounts instead of getAssetsByOwner?
getTokenAccounts is more efficient when you only need one specific token. getAssetsByOwner fetches all tokens which uses more bandwidth if you only care about checking USDC or another single token.