SOL Balance

Get native SOL balance using the standard getBalance RPC method. This is the simplest and fastest way to check a wallet's SOL balance.

Try It

Code Example

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

const helius = new Helius('YOUR_API_KEY');

async function getSolBalance(address: string) {
const response = await helius.rpc.getBalance(address);

const lamports = BigInt(response.value);
const sol = Number(lamports) / 1_000_000_000;

return {
lamports,
sol
};
}

// Usage
const balance = await getSolBalance('86xCnPeV69n...');
console.log(`Balance: ${balance.sol} SOL`);

Frequently Asked Questions

How do I get a wallet balance on Solana?
Use the getBalance RPC method with a wallet address. It returns the balance in lamports (1 SOL = 1,000,000,000 lamports). Divide by 1e9 to convert to SOL.
What are lamports?
Lamports are the smallest unit of SOL, similar to how satoshis are to Bitcoin. 1 SOL equals 1 billion lamports (1e9). The getBalance method returns lamports.
Is getBalance free to call?
Yes, getBalance is a standard RPC method included in free tier plans. It only reads data and does not require any transaction fees.