Solana infrastructure, included with every server. LEARN MORE>

OpenInfra.shopeninfra.sh

Solana RPC

Solana JSON-RPC 2.0 over the authenticated OpenInfra gateway. Method request and response shapes follow the standard Solana interface.

Endpoint and authentication

Send HTTPS requests to https://rpc.sol.openinfra.sh with your dashboard key in x-api-key. The verified api-key query parameter is available for clients that cannot set headers.

curl https://rpc.sol.openinfra.sh \  -H "content-type: application/json" \  -H "x-api-key: $OPENINFRA_API_KEY" \  -d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}'

Request format

{  "jsonrpc": "2.0",  "id": 1,  "method": "<method>",  "params": [    /* positional parameters */    { "commitment": "confirmed" }  /* optional config object */  ]}

Response format

{  "jsonrpc": "2.0",  "id": 1,  "result": { /* method-specific result */ }} /* Error case */{  "jsonrpc": "2.0",  "id": 1,  "error": { "code": -32602, "message": "Invalid params" }}

Error codes follow the JSON-RPC 2.0 spec. Solana-specific codes are in the range -32000 to -32099.

Commitment levels

  • processed — slot received, not yet confirmed. Lowest latency.
  • confirmed — majority of validators voted on this slot.
  • finalized — slot is rooted and will not be rolled back.

Default commitment is finalized unless overridden in the config object.

Common methods

MethodDescription
getSlotCurrent slot number
getBalanceLamport balance for an address
getAccountInfoFull account data (owner, data, lamports, rent epoch)
getMultipleAccountsBatch account info in a single call
getTransactionTransaction by signature (with metadata)
sendTransactionSubmit a signed, serialised transaction
simulateTransactionDry-run a transaction without committing
getLatestBlockhashCurrent blockhash + last-valid block height
getSignatureStatusesConfirmation status for one or more signatures
getProgramAccountsAll accounts owned by a program (with filters)
getTokenAccountsByOwnerSPL token accounts for a wallet

Detailed references