Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.soo.network/llms.txt

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

getBalance RPC Method

Returns the lamport balance of the account of provided Pubkey.

Parameters

string required
Pubkey of account to query, as base-58 encoded string
object optional
Configuration object containing the following fields:
commitment string optional
The level of commitment desired when querying state
minContextSlot number optional
The minimum slot that the request can be evaluated at

Code Sample

curl https://rpc.testnet.soo.network/rpc -X POST -H "Content-Type: application/json" -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": [
    "6dRnxBGavrfCyKRwfkdwBWxVwwBpwx4ZJpca6K5bbLYo",
    {
      "commitment": "finalized"
    }
  ]
}'

Response

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

Result

The result will be an RpcResponse JSON object with value field equal to:
  • Number of lamports in the account, as a u64 integer