Solana RPC

Endpoints, request format, limits and method availability for the constant-k Solana JSON-RPC API.

constant-k serves the standard Solana JSON-RPC API from mainnet nodes it builds and runs. Any Solana SDK works unchanged against a constant-k endpoint with your API key.

  • Standard JSON-RPC methods, including getTransaction, getSignaturesForAddress and getBlock.
  • Accounts indexed by program ID and by SPL token mint and owner, so queries such as getTokenAccountsByOwner resolve from an index.
  • sendTransaction forwards to the next five leaders and rebroadcasts. See Sending Transactions.
  • WebSocket subscriptions in the Operator, Blade Runner and Nexus plans. See WebSockets.

Endpoints

RegionURL
United States flag New Yorkhttps://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY
Germany flag Frankfurthttps://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY
Netherlands flag Amsterdamhttps://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY
Nearest region (geo-routed)https://rpc.constant-k.com/?api-key=YOUR_API_KEY

The key can also go in a header. See Authentication.

Request format

Requests are JSON-RPC 2.0 over HTTP POST, one call per request or a batch of calls in one request. This example reads a wallet's SOL balance.

curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "getBalance",
    "params": ["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", {"commitment": "confirmed"}]
  }'

Each method's parameters and response format are in the method reference, for example getBalance, getAccountInfo and getTransaction.

A response can carry HTTP 200 and a JSON-RPC error object. Any body with an error field is a failure, whatever the status code. See Errors.

Commitment levels

Most read methods take a commitment option. It sets how final the data must be.

LevelMeaningSuits
processedThe node has processed the block. It can still be skipped.The lowest latency, when you can handle rollbacks
confirmedA supermajority of stake has voted on the block.Most apps and trading logic
finalizedThe block is rooted and will not change.Balances you report to users, accounting, withdrawals

Method availability

Most methods are on every plan. Per-plan rates are on Plans & Limits.

MethodsPlans
getLatestBlockhash, getMultipleAccounts, getSignatureStatuses, getSignaturesForAddress, getTokenAccountsByOwner, simulateTransaction, sendBundle, simulateBundle, getBundleStatuses, getInflightBundleStatuses, the staked (SWQoS) send pathOperatorBlade RunnerNexus
getBlocks, getBlocksWithLimit, getSupply, getTokenLargestAccounts, getTokenAccountsByDelegate, getProgramAccounts, getProgramAccountsV2, Address Lookup Table lookupsBlade RunnerNexus
getTransactionsForAddressNexus

getProgramAccounts, getProgramAccountsV2 and Address Lookup Table lookups have extra conditions:

  • getProgramAccounts needs at least one filter (dataSize or memcmp), except on the indexed programs listed on its page. Scans of the token programs must be owner-scoped: a dataSize: 165 filter plus a memcmp of the full 32-byte owner at offset 32. getProgramAccounts and getProgramAccountsV2 share one budget per API key: 25 calls per second in the Blade Runner plan and 75 in the Nexus plan. There is no cap on open requests. Over the rate, the endpoint returns 429.
  • getProgramAccountsV2 is paginated and returns up to 10,000 accounts per page, 1,000 by default, on the same shared budget.
  • Address Lookup Table queries go through getProgramAccounts or getProgramAccountsV2 with the Address Lookup Table program id as the first parameter, are answered from an in-memory index, and count against the same budget; there is no separate method or hostname. See Address Lookup Tables.

Methods not served on any plan

MethodInstead
getLargestAccountsNot available

Batch requests

A batch is a JSON array of JSON-RPC calls in one HTTP POST. It is accepted on the standard RPC URLs, the staked RPC URLs and the Neon Zero URLs, in every region, on every plan.

[
  { "jsonrpc": "2.0", "id": 1, "method": "getBalance", "params": ["83astBRguLMdt2h5U1Tpdq5tjFoJ6noeGwaY3mDLVcri", { "commitment": "confirmed" }] },
  { "jsonrpc": "2.0", "id": 2, "method": "getSlot" }
]
PlanCalls per batch
Free5
Operator10
Blade Runner25
Nexus50
  • Every method that works as a single call works inside a batch. On a staked URL, sendTransaction in a batch takes the staked send path.
  • Each call counts as one request against every limit a single call has: the plan total, the method rate, the monthly limits and the send limits. A batch of 10 uses 10 requests.
  • A batch over the cap is refused with HTTP 400 and code -32600, and none of its calls run.
  • The reply is one JSON array in the same order as the calls, each entry carrying its own id. A call with no id (a notification) runs and gets no entry.
  • A call that is refused, over a limit or fails gets its own error object in its slot, the same error a single call would get. The other calls still run, and the batch reply carries HTTP 200.
  • Retry-After on a batch reply is the longest Retry-After any of its calls got.

Batch size and order

At most 8 calls of one batch run at the same time. Reply slots come back in the order of the calls, so a slow call delays the calls after it. Slow calls such as getProgramAccounts and history calls keep the rest of the batch fast when they are placed last, or sent alone.

SituationReply
An item is not a JSON objectIts slot is { "code": -32600, "message": "Invalid Request" } with id null. The other calls run.
An empty array []HTTP 400, code -32600, Invalid Request.
A call whose reply would pass the 32 MiB cap on the whole batch replyThat call gets -32600 with Batch reply over 32 MiB: send this request alone, and the calls after it get the same.
A reply over 64 KiB to an HTTP/1.0 clientHTTP 400 with Batch reply too long for HTTP/1.0: use HTTP/1.1.

Request limits

CapValue
Calls per requestOne call, or a batch of up to 5, 10, 25 or 50 calls by plan. See Batch requests.
Request body1 MB. Over that the gateway returns a plain HTTP 413. The nodes themselves accept 200 KB, so that is the effective ceiling.
getMultipleAccounts, getSignatureStatuses100 items per call
Time per request60 seconds. A longer call is cut off, so heavy getBlock and getProgramAccounts calls need narrowing.

Cached reads

Reads can be up to one slot old. Identical getAccountInfo, getMultipleAccounts, getTokenAccountsByOwner, getLatestBlockhash, getSignaturesForAddress, getRecentPrioritizationFees and getSlotLeaders calls that arrive within 366 ms of each other, which is one slot, share a single answer.

Polling the same account faster than that returns the same data and still uses your quota. A getTransaction for a transaction that has not landed is never cached, so confirmation polling always reads live state.

Transaction history

History is served from each region's own ledger. Once a slot falls out of a region's ledger, getTransaction can no longer return it. In the Free, Operator and Blade Runner plans, history ends at that window.

Past the ledger window, these lookups reach long-term storage:

Lookup past the region's ledger windowFreeOperatorBlade RunnerNexus
getBlock: older blocks, back to genesisNoneNone1 block / 15 s1 block / 3 s
getSignaturesForAddress: older signaturesNoneNoneNone✓
getTransaction: older transactions, for signatures from getSignaturesForAddressNoneNoneNone✓
getTransactionsForAddress: full address historyNoneNoneNone✓

Limits, waits and over-limit behaviour are on Historical lookups.

Cube Runner answers every getBlock request and can return blocks older than the ledger window. It returns an older block when the region cache or another region's cache holds that block. It also retrieves older blocks from long-term storage, which holds every block since genesis, for the plans in Cube Runner's plan comparison.

  • The window is finite and moves with the chain. It is measured in stored data, not in hours, so its length changes with the size of recent blocks.
  • The window differs between regions. A signature that resolves in one region can be missing in another. Only the region being queried can answer for its own window.
  • getFirstAvailableBlock returns the oldest block from which every later block can be retrieved with getBlock. With long-term storage (Blade Runner and Nexus plans), it returns 0, the genesis block. Without it (Free and Operator plans), it returns the oldest block from which the region holds every later block, in its cache or its ledger. Older blocks are still returned when a cache in any region holds them.
  • minimumLedgerSlot returns the oldest slot the region's ledger holds. That slot is the history depth for getTransaction.
  • Both calls are cheap and report the actual depth rather than an assumed one.

Transaction history older than the window, past the historical lookups limits, has to come from your own store, written as the data arrives, or from an archive service.

Browser requests

The endpoints answer CORS preflight requests and allow any origin, including credentials. They accept the X-API-Key and solana-client request headers, so a page can call the RPC directly.

A browser call exposes your API key

Anyone who loads the page can read the key. A public site needs its own backend in front.

Efficient calls

  • One HTTP client with keep-alive per process. A new TLS handshake on every call adds a full round trip or more.
  • One getMultipleAccounts call fetches up to 100 accounts, in place of many getAccountInfo calls.
  • encoding: "base64" with dataSlice returns only the bytes you need.
  • minContextSlot rejects state older than a slot you have already seen.
  • A WebSocket subscription or a Kaldera stream replaces fast polling.
  • One region per flow. See Choosing a region.

On this page