Solana RPC Endpoint Documentation

Solana RPC Endpoint Documentation

Use ERPC as your Solana RPC endpoint for HTTP JSON-RPC requests and WebSocket subscriptions. The same Solana endpoint URL works for standard RPC methods, and the API key can be managed from the ERPC Web Dashboard.
Please add your API key to the 'api-key' parameter.
endpoint
https://edge.erpc.global?api-key=<YOUR_API_KEY>

Examples:

Here is an HTTP request example.
bash
curl https://edge.erpc.global?api-key=<YOUR_API_KEY> --header 'Content-Type: application/json' --data '{
  "jsonrpc":"2.0","id":1,
  "method":"getBlockHeight"
}'
Here is a WebSocket subscription example. The host is the same as HTTP.
endpoint
wss://edge.erpc.global?api-key=<YOUR_API_KEY>
bash
# Example: subscribe to slot updates
wscat -c "wss://edge.erpc.global?api-key=<YOUR_API_KEY>"
# After connected, send:
{"jsonrpc":"2.0","id":1,"method":"slotSubscribe"}
You can obtain and check your API key on the ERPC Web Dashboard: ERPC Web Dashboard
If you need lower latency than WebSocket, consider Geyser gRPC or ShredStream. You can discuss details with us through the ERPC Web Dashboard.

History Access

Add history=true to the edge.erpc.global URL of an HTTP request to look up older blocks and transactions; the value must be exactly true, in lowercase. Except for getTransactionsForAddress, a request without history=true is answered from the recent range each node holds; the option applies to these methods:
  • getBlock
  • getBlockTime
  • getBlocks
  • getBlocksWithLimit
  • getTransaction, including getParsedTransaction
  • getSignaturesForAddress
  • getSignatureStatuses, when searchTransactionHistory is true
  • getTransactionsForAddress, when transactionDetails is "full" (history access required)
Put the API key and the option in the URL as query parameters:
endpoint
https://edge.erpc.global?api-key=<YOUR_API_KEY>&history=true
Or send Authorization: Bearer <YOUR_API_KEY> as a header, with the option in the URL:
endpoint
https://edge.erpc.global?history=true
Here is an HTTP request example that uses history access.
bash
curl 'https://edge.erpc.global?history=true' \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc":"2.0","id":1,
  "method":"getBlock",
  "params":[<SLOT>,{"maxSupportedTransactionVersion":1}]
}'
For every method except getTransactionsForAddress in "full" mode:
  • Each call answered by history access costs 640 tokens more than its regular price: getBlock costs 42 + 640 = 682.
  • A null, empty or partial result from history access carries the surcharge too. A failed lookup carries no surcharge.
  • A call answered from recent data keeps its regular price, even with history=true.
  • A batch counts each call on its own; getSignatureStatuses counts once per call, not per signature.
  • Leave history=true off polling for recent transactions: each null there carries the surcharge.
Free allowances, including the Free plan's, have a limit for history access. The Free plan is limited to one history access request per 10 seconds.
A getTransactionsForAddress call with transactionDetails set to "full" is history access, whether the transactions are recent or old:
  • The call requires history=true in the edge.erpc.global URL. A request without it is refused with the history access error (code -32011) and carries no charge.
  • With history=true, the call costs 420 + 640 × N tokens: its regular price of 420, plus 640 for each of the N transactions fetched, recent or old. A row without a transaction is not counted.
  • The call must be sent as a separate request. A batch that contains it is refused, with or without history=true: each call in the batch is answered with error -32600 and the message This request is not available in a mixed JSON-RPC batch. Please send it as a separate request., and none of them is sent.
The default signatures mode needs no history=true and carries no surcharge. To poll an address for new transactions, use signatures mode and fetch the ones you need with getTransaction.
A lookup for older blocks or transactions may take much longer than a regular request, in some cases seconds. History access is a separate option that keeps these lookups apart from regular requests, so that regular requests stay fast.
Without history=true, a getBlock or getBlockTime request for an older slot may return this error:
json
{
  "jsonrpc": "2.0",
  "error": {
    "code": -32011,
    "message": "This request needs history access. Add history=true to the endpoint URL.",
    "data": {
      "erpcCode": "ERPC_HISTORY_OPTION_REQUIRED"
    }
  },
  "id": 1
}
getTransaction, getParsedTransaction and getSignatureStatuses (with searchTransactionHistory: true) return null for a signature older than the node holds, while getSignaturesForAddress, getBlocks and getBlocksWithLimit return an empty or partial result.
A request with history=true may return these messages:
  • This plan has reached its limit for history access. Add a paid plan to use tokens for history access. — shown when an allowance, such as the Free plan's, reaches its limit.
  • History access is unavailable while your token balance is low. Add tokens. — shown on a paid plan when the token balance is low.
  • On the Free plan, history access is limited to one request per 10 seconds. Slow down or use a paid plan. — shown on the Free plan when history access requests arrive too quickly.

Unlimited Endpoint Supported Methods

Unlimited Endpoints are dedicated HTTP endpoints optimized for low-latency standard Solana RPC calls. These are the supported standard Solana RPC methods:
  • getSlot
  • getBlockHeight
  • getLatestBlockhash
  • getBalance
  • getAccountInfo
  • getMultipleAccounts
  • getTransaction
  • sendTransaction
  • simulateTransaction
  • getSignatureStatuses
  • getRecentPrioritizationFees
  • getHealth
  • getVersion
  • getEpochInfo
  • getBlock
For methods outside this supported set, use https://edge.erpc.global?api-key=<YOUR_API_KEY>.

Solana RPC Methods and Documentation

For the full list of methods, parameters, and subscription specifications, please refer to the official documentation. It covers both HTTP and WebSocket usage.