Solana RPC

Account Methods

Query account balances, data, program-owned accounts, and rent exemption status on Solana.

getAccountInfo

POST - JSON-RPC

Returns all information associated with the account of the provided Pubkey.

params[0]stringrequired

Account Pubkey as a base-58 encoded string.

params[1]object

Configuration object:

  • encoding (string) - base58, base64, base64+zstd, jsonParsed
  • dataSlice (object) - { offset: number, length: number } to limit returned data
  • commitment (string) - commitment level
curl https://rpc.nln.clr3.org \  -H "Content-Type: application/json" \  -H "x-api-key: YOUR_API_KEY" \  -d '{"jsonrpc":"2.0","id":1,"method":"getAccountInfo","params":["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg",{"encoding":"base64"}]}'

getBalance

POST - JSON-RPC

Fetches the lamport balance of the account associated with the provided Pubkey.

params[0]stringrequired

Account Pubkey as a base-58 encoded string.

params[1]object

Configuration object with commitment and minContextSlot.

curl https://rpc.nln.clr3.org \  -H "Content-Type: application/json" \  -H "x-api-key: YOUR_API_KEY" \  -d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["83astBRguLMdt2h5U1Tbd1hZemEfWp1YGt6jZvoRoKCo"]}'

getMultipleAccounts

POST - JSON-RPC

Returns the account information for a list of Pubkeys (up to 100).

params[0]arrayrequired

Array of Pubkeys as base-58 encoded strings (max 100).

params[1]object

Configuration object with encoding, commitment, dataSlice, minContextSlot.

curl https://rpc.nln.clr3.org \  -H "Content-Type: application/json" \  -H "x-api-key: YOUR_API_KEY" \  -d '{"jsonrpc":"2.0","id":1,"method":"getMultipleAccounts","params":[["vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg","4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA"],{"encoding":"base64"}]}'

getProgramAccounts

POST - JSON-RPC

Returns all accounts owned by the provided program Pubkey.

params[0]stringrequired

Program Pubkey as a base-58 encoded string.

params[1]object

Configuration object:

  • encoding (string) - data encoding format
  • commitment (string) - commitment level
  • filters (array) - filter criteria (memcmp or dataSize)
  • dataSlice (object) - limit returned data
  • withContext (boolean) - wrap result in context
  • minContextSlot (integer) - minimum slot for evaluation
curl https://rpc.nln.clr3.org \  -H "Content-Type: application/json" \  -H "x-api-key: YOUR_API_KEY" \  -d '{"jsonrpc":"2.0","id":1,"method":"getProgramAccounts","params":["TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",{"encoding":"base64","filters":[{"dataSize":165}]}]}'