Carbium RPC

Solana RPC Methods Explained

Choose the right Solana JSON-RPC method for account reads, transaction submission, confirmation checks, network health, and program data—then follow the safe next step for production.

Solana RPC methods let an application ask a specific question about chain state, prepare or submit a transaction, and inspect what happened after it was sent. Use Carbium RPC for standard JSON-RPC reads, transaction submission, and confirmation checks. Use this page to choose the method that matches the task; use the official Solana reference for the complete parameter and response schema of every method.

Choose a method by the job you need to do

If your application needs to... Start with What it answers
Check a wallet's SOL balance getBalance How much SOL a public key holds at the requested commitment level
Read one account or token account getAccountInfo The account's owner, lamports, executable state, and encoded account data
List token accounts owned by a wallet getTokenAccountsByOwner Which SPL token accounts match an owner and mint/program filter
Fetch accounts belonging to a program getProgramAccounts Matching program-owned accounts; filter and limit the result before using it in production
Check node and chain progress getHealth, getSlot, getBlockHeight Whether the endpoint can answer and where it is relative to chain progress
Build a transaction getLatestBlockhash A recent blockhash and the block height at which it expires
Test a signed transaction before sending simulateTransaction Whether simulation succeeds and which logs or errors are returned without broadcasting it
Submit a signed transaction sendTransaction A transaction signature after the node accepts the request for relay
Check whether a signature landed getSignatureStatuses, getTransaction Confirmation state first, then full transaction detail when needed

📘 A successful sendTransaction response is not final confirmation. Persist the signature, then check status before treating the workflow as complete.

The normal transaction path

For a transaction flow, method order matters more than memorising every method name:

  1. Get a recent blockhash with getLatestBlockhash.
  2. Build and sign the transaction in the correct signing boundary.
  3. Simulate with simulateTransaction when you need pre-send logs or want to catch execution failure before broadcast.
  4. Submit with sendTransaction.
  5. Store the returned signature and check getSignatureStatuses.
  6. Inspect details with getTransaction only when the application, support workflow, or incident needs the full result.

Use Transaction Lifecycle for the full lifecycle, and RPC Errors Reference when the failure layer is unclear. If a blockhash expires or a send result is ambiguous, use the Blockhash Expiry Recovery Playbook rather than immediately rebuilding and resending.

Read methods: state at a point in time

getBalance

Use getBalance for a direct SOL balance read. It is the simplest smoke test after you connect a wallet, dashboard, or backend to an RPC endpoint.

curl -X POST "https://rpc-service.carbium.io/?apiKey=$CARBIUM_RPC_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBalance",
    "params": ["YOUR_PUBLIC_KEY", {"commitment": "confirmed"}]
  }'

The result's value is expressed in lamports. A SOL balance is one kind of account data; use getAccountInfo when you need the account owner, raw data, or executable state instead.

getAccountInfo

Use getAccountInfo when an application needs to inspect one known account. It is appropriate for wallet addresses, token accounts, program state accounts, and other public keys where the application already knows what it is looking for.

getTokenAccountsByOwner

Use getTokenAccountsByOwner when a wallet view needs the token accounts associated with one owner. Be deliberate about the token-program or mint filter so the request matches the product question instead of returning more account data than the UI needs.

getProgramAccounts

Use getProgramAccounts only when the application genuinely needs program-owned accounts. Filters, data slices, slot context, pagination strategy, caching, and a move to streaming can matter more than the method call itself. Follow getProgramAccounts Without Melting Your App before placing broad scans on a production request path.

Health and chain-position checks

getHealth is a small endpoint smoke test. getSlot and getBlockHeight add chain-position context when an application needs to reason about freshness or node progress.

Do not use a single successful health response as a complete production health model. Pair it with the request outcomes, slot freshness, and application-level signals that matter to your workload. If a node reports it is behind or returns stale-looking data, follow Solana RPC Node Is Behind.

Commitment changes what a read means

Many Solana RPC methods accept a commitment option. It controls how finalized the returned state must be.

Commitment Use when
processed The application needs the newest node view and can tolerate that it may change
confirmed A normal application read needs a stronger confirmation point
finalized The workflow needs the strongest finality level exposed by the cluster

Choose the commitment level as a product decision, not a default copied into every request. Read Solana Commitment Levels before applying one setting to balances, trading decisions, and settlement workflows alike.

Common methods directory

The methods below are a quick selector, not a replacement for Solana's complete HTTP-method reference.

Accounts and tokens

Method Use it for
getBalance Read the SOL balance of one public key
getAccountInfo Inspect one known account
getTokenAccountsByOwner Find matching token accounts for an owner
getTokenAccountBalance Read the balance of one token account
getTokenSupply Read supply information for one mint
getProgramAccounts Query filtered accounts owned by a program

Transactions

Method Use it for
getLatestBlockhash Obtain a recent blockhash before building a transaction
simulateTransaction Test execution and inspect logs without broadcasting
sendTransaction Submit a signed transaction to the RPC node
getSignatureStatuses Check the current status of one or more signatures
getTransaction Read full transaction details after it is available
isBlockhashValid Check whether a blockhash is still valid

Network, blocks, and cluster state

Method Use it for
getHealth Run a small endpoint-health check
getSlot Read the current slot
getBlockHeight Read the current block height
getBlock Read one block by slot
getBlocks List blocks across a slot range
getBlockTime Read a block's Unix timestamp
getEpochInfo Read current epoch progress
getVersion Read the node software version

When normal RPC is the wrong shape

JSON-RPC is the right default when the application asks a specific question or submits a specific transaction. It is not always the right shape for an always-on "tell me whenever this changes" workload.

If a backend continuously polls for program, account, or transaction activity, evaluate Carbium gRPC before increasing polling frequency. Use streaming for continuous detection, then use targeted RPC reads and writes where the workflow needs them.

Production checklist

Before production traffic depends on a method:

  • keep the Carbium RPC key outside browser bundles and public repositories
  • test the method with the commitment level and response shape your application expects
  • define timeout, retry, and duplicate-send behaviour before an incident
  • watch request volume and avoid retry storms after errors or 429 responses
  • record the transaction signature before changing or rebuilding a transaction flow

Use Quick Start RPC for the initial endpoint setup and Solana RPC Rate Limits Explained for burst traffic, retry, and request-shaping guidance.

Technical reference

For the complete standard method catalog, parameter definitions, and response schemas, use the official Solana RPC reference. Carbium's role on this page is to help you choose the method and apply it safely with Carbium RPC.