Skip to content

Common RPC calls on Solana

Course: Creating a web based wallet, RPCs - chapter 7

Retrieves information about a specific account.

{
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": ["Eg4F6LW8DD3SvFLLigYJBFvRnXSBiLZYYJ3KEePDL95Q"]
}

Gets the balance for a given account

{
"jsonrpc": "2.0",
"id": 1,
"method": "getBalance",
"params": ["Eg4F6LW8DD3SvFLLigYJBFvRnXSBiLZYYJ3KEePDL95Q"]
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "getTransactionCount"
}