Solana RPC · Accounts & balances
POST getBalance
Lamport balance of an account.
Endpoint
POST https://solrpc.infinityblocks.io/<API_KEY>
Standard Solana JSON-RPC 2.0 over HTTP POST. The API key is part of the URL path.
Parameters
| Param | Type | Required | Description |
|---|---|---|---|
address | string | yes | Base-58 account pubkey. |
config | object | no | Optional, e.g. {"commitment":"confirmed"}. |
Request
curl -s https://solrpc.infinityblocks.io/<API_KEY> \
-X POST -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["<ADDRESS>",{"commitment":"confirmed"}]}'
With @solana/web3.js
const lamports = await rpc.getBalance(new PublicKey("<ADDRESS>"));
Response
{ "jsonrpc": "2.0", "id": 1, "result": { "context": { "slot": 423214981 }, "value": 12480000 } }
Try it
Run getBalancelive · POST
Replace placeholders (e.g. <ADDRESS>) with real values. Your key is stored only in this browser.
—