Loading documentation…
Read a Solana account's lamport balance over rpc edge JSON-RPC.
getBalance returns the lamport balance of an account. It is the cheapest way to read a wallet's
SOL balance without pulling the full account.
curl -s https://rpc.rpcedge.com \
-H 'content-type: application/json' \
-H 'x-api-key: YOUR_UUID_KEY' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg", { "commitment": "processed" }]
}'| Position | Name | Type | Notes |
|---|---|---|---|
0 | pubkey | string | Base-58 account address. |
1 | config | object | Optional. commitment (processed | confirmed | finalized) and minContextSlot. |
{
"jsonrpc": "2.0",
"id": 1,
"result": { "context": { "slot": 429641447 }, "value": 2039280 }
}value is the balance in lamports (1 SOL = 1,000,000,000 lamports). Divide by 1e9 for SOL.
A non-existent account returns 0, not an error - use getAccountInfo if you
need to distinguish "empty" from "does not exist".