Solana RPC Payload Builder

Instantly construct perfectly formatted JSON-RPC payloads for querying Solana nodes. No massive documentation required.

Returns the SOL balance of the account of provided Pubkey

Generated Snippets

Raw JSON Body
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getBalance",
  "params": [
    ""
  ]
}
Terminal (cURL)
curl https://api.mainnet-beta.solana.com/ \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":[""]}'
Javascript Fetch
const response = await fetch("https://api.mainnet-beta.solana.com/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBalance",
    "params": [
      ""
    ]
  })
});
const data = await response.json();