Skip to main content

getBalance

Returns the lamport balance of the account of provided Pubkey

Parameters

Pubkey <string>

  • Pubkey of account to query, as base-58 encoded string

Result

RpcResponse<u64> - RpcResponse JSON object with value field set to the balance

Code sample

curl "https://testnet.atlas.xyz/?apikey=$ATLAS_API_KEY" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"method": "getBalance",
"params": [
"PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY"
]
}
'

Response

{
"jsonrpc": "2.0",
"id": "0bdba4c1-3073-41b0-b849-46f14e004e38",
"result": {
"context": {
"slot": 11137882
},
"value": 1141440
}
}