Skip to content

​In short

RPC is the HTTP/JSON API your code uses to read from and send to the network. Use public endpoints for testing and a provider in production. Solana RPC provides methods to read network state, send transactions, simulate execution, and subscribe to live updates.
  1. Applicationyour client or backend
  2. RPC endpointHTTP and WebSocket APIs
  3. Validatorstate reads and relay
  4. Networkaccounts and programs
The RPC tab also holds SDKs, CLI references, and network constants.
Code samples on the HTTP and WebSocket reference pages run on both web3.js v3 and web3.js (legacy). web3.js v3 returns bigint for numeric fields such as slots, lamports, and counts (legacy returns number), and returns readonly arrays.The Rust samples target solana-client 4.4 with solana-sdk 5, which needs Rust 1.98.1 or later. They also build with solana-client 4.3 and solana-sdk 4. Keep solana-transaction-status-client-types and solana-account-decoder on the same version as solana-client, and add solana-commitment-config 3, tokio (with the full feature), and anyhow. Some samples also use solana-system-interface 3 (with the bincode feature), futures, base64, and bincode.

​Cluster Endpoints

The endpoint you call decides which cluster you read from and send to.
ClusterPublic RPC endpointDescription
Mainnethttps://api.mainnet.solana.comProduction network using real SOL.
Devnethttps://api.devnet.solana.comDeveloper testing network. Use the Solana Faucet to get Devnet SOL.
Testnethttps://api.testnet.solana.comValidator testing network.
Public endpoints are shared and rate-limited, and aren’t meant for production. They return 429 when you exceed rate limits and 403 when traffic is blocked. For production, choose an RPC provider and follow the production readiness guide, starting with RPC infrastructure.
For local development, Surfpool and solana-test-validator use these default localhost endpoints:
InterfaceEndpoint
HTTP RPChttp://localhost:8899
WebSocketws://localhost:8900

​Configuring State Commitment

Many methods and subscriptions accept a commitment parameter: how final a block must be before the node returns data or sends a notification.
CommitmentDescription
processedThe node’s most recent processed block. This is the newest view, but the block can still be skipped.
confirmedThe same block as finalized. Kept for compatibility and planned for removal in a later release.
finalizedA block with a finalization certificate: votes from 80% of stake in one round, or from 60% of stake in each of two rounds.
confirmed and finalized return the same data, roughly 150 milliseconds after a block is produced on mainnet; prefer finalized in new code. See settlement and finality. If a method or subscription accepts commitment and you omit it, the default is typically finalized.