Skip to main content
POST
/
getProgramAccounts
curl --request POST \
  --url https://rpc-mainnet.solanatracker.io/ \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
  "method": "getProgramAccounts",
  "params": [
    "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"
  ]
}'
{
  "jsonrpc": "2.0",
  "id": "db16f277-1a22-41ff-9f85-f37e2cd77900",
  "result": [
    {
      "pubkey": "CxELquR1gPP8wHe33gZ4QxqGB3sZ9RSwsJ2KshVewkFY",
      "account": {
        "lamports": 15298080,
        "owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
        "data": [
          "2R9jLfiAQ9bgdcw6h8s44439",
          "base58"
        ],
        "executable": false,
        "rentEpoch": 28,
        "space": 42
      }
    }
  ]
}
⚡ Powered by Solana Ridge DBGet faster Solana account data with Ridge DB, our custom-built client designed specifically for high-performance account retrieval on Solana. Unlike standard RPC methods, Ridge DB uses specialized indexes that make querying program accounts significantly faster.What makes it different:Need to track only new accounts? Use changedSince to fetch accounts modified after a specific slot, perfect for incremental updates without re-fetching everything. Want to filter out dust? The excludeZero parameter automatically hides empty token accounts, reducing bandwidth and speeding up your queries. Use cursor pagination to efficiently retrieve all accounts (up to 10k per request.)
High Load ConsiderationsThis endpoint streams all accounts directly to your client. While this works great for most queries, it can return errors during high load or when querying programs with millions of accounts (like liquidity pools or protocol-owned accounts).Need better reliability? Use getProgramAccountsV2 instead. The V2 method includes pagination support, making it more efficient and reliable for large programs and high-traffic scenarios.

Authorizations

api-key
string
query
required

Body

application/json
jsonrpc
enum<string>
default:2.0
required

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string
default:1
required

A unique identifier for the request.

Example:

"1"

method
enum<string>
default:getProgramAccounts
required

The name of the RPC method to invoke.

Available options:
getProgramAccounts
Example:

"getProgramAccounts"

params
array
required

Parameters for the method.

Response

Successfully retrieved program accounts.

jsonrpc
enum<string>

The JSON-RPC protocol version.

Available options:
2.0
Example:

"2.0"

id
string

Identifier matching the request.

Example:

"1"

result
object[]

List of program accounts.

I