getBalance

Returns the lamport balance of the account of provided Pubkey.

POST Category: account

Example Request

curl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": [
    "83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri",
    { "commitment": "finalized" }
  ]
}'

Example Response

{
  "jsonrpc": "2.0",
  "result": {
    "context": { "slot": 1 },
    "value": 0
  },
  "id": 1
}

Developer Guide

getBalance Solana Developer Guide — Learn how to read a single Solana account balance with getBalance, while handling API keys in a frontend — Shield keys that keep your account key out of the browser, a wallet connector in pure JavaScript, and the connected wallet's balance on screen.

← Back to all methods