Returns the lamport balance of the account at the given public key.
Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["83astBRguLMdt2h5U1Tbd1hAV3DsGk2LPkhoj6EMAM"]
}
Parameters
Base-58 encoded public key of the account to query.
Commitment level for the query. One of processed, confirmed, or finalized.
Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"context": { "slot": 123456789 },
"value": 1000000000
}
}
Account balance in lamports. Divide by 1,000,000,000 to convert to SOL.
Example
curl "https://rpc.solami.fast/sol?api_key=YOUR_API_KEY" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["83astBRguLMdt2h5U1Tbd1hAV3DsGk2LPkhoj6EMAM"]
}'