Docs menuSolana relay

API reference

Solana relay

The pages reach Solana through this relay, so the site's connection key never leaves the server.

Send one RPC request

POST/api/rpcNo sign in, CSRF header

Takes one standard Solana JSON-RPC request and answers the RPC's own JSON. One request at a time: batches are refused. The body can be up to 8 KB.

Sign in
Not needed
CSRF header
Needed: x-zpad: zpad
Cached
Never
Rate limit
120 a minute per address (IP), of which 20 sends

Body

NameTypeWhat it is
jsonrpc"2.0"The JSON-RPC version.
idnumber or stringYour request id.
methodstringOne of the allowed methods below.
paramsarrayOptional. The method's parameters.

Response

200
{
  "jsonrpc": "2.0",
  "id": <your id>,
  "result": <the method's answer>
}

Errors

StatusMessageWhen
400Parse error.JSON-RPC code -32700: the body is not JSON.
400One request at a time.JSON-RPC code -32600: a batch (an array).
400Invalid params.JSON-RPC code -32602: params is not an array.
403Method not allowed here.JSON-RPC code -32601: the method is not on the list below.
403Missing request header.No CSRF header. No JSON-RPC wrapper: { error, code }.
413Request too large or empty.JSON-RPC code -32600: the body is empty or over 8 KB.
429Too many requests. Wait a moment and try again.More than 120 a minute ("Too many transactions." for sends over 20). No JSON-RPC wrapper.
502The Solana connection did not answer. Try again in a moment.JSON-RPC code -32000.
503The Solana connection is not set up on this site yet.JSON-RPC code -32000.

Example

Terminal
curl -s -X POST "/api/rpc" \
  -H "x-zpad: zpad" \
  -H "content-type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"getBalance","params":["<wallet address>"]}'

Allowed methods

KindMethods
ReadsgetLatestBlockhash, getBlockHeight, getBalance, getAccountInfo, getMultipleAccounts, getTokenAccountsByOwner, getTokenAccountBalance, getSignatureStatuses, getTransaction, getFeeForMessage, getMinimumBalanceForRentExemption, getRecentPrioritizationFees
SendssendTransaction, simulateTransaction (20 a minute per address)
Cookies On Our Website. We use cookies to keep you signed in and remember your settings.