跳转到主要内容
POST
Run `getProgramAccounts`
curl --request POST \
  --url 'https://rpc-mainnet.solanatracker.io/?api_key=' \
  --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
      }
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt

Use this file to discover all available pages before exploring further.

⚡ 由 Solana Ridge DB 提供支持通过 Ridge DB(我们专为 Solana 上的高性能账户检索而定制构建的客户端)获取更快的 Solana 账户数据。与标准 RPC 方法不同,Ridge DB 使用专门的索引,使查询程序账户的速度显著加快。它的与众不同之处:只需追踪新账户?使用 changedSince 获取在某个 slot 之后修改的账户,这样您就不必重新加载所有内容。使用游标分页可以高效检索所有匹配的账户,每次请求最多 10k 条。
高负载注意事项此端点会将所有账户直接流式返回给您的客户端。虽然在大多数查询场景下表现良好,但在高负载或查询拥有数百万账户的程序(例如流动性池或协议拥有的账户)时,可能会返回错误。需要更高的可靠性? 请改用 getProgramAccountsV2。V2 方法包含分页支持,对于大型程序和高流量场景更加高效和可靠。

授权

api_key
string
query
必填

请求体

application/json
jsonrpc
enum<string>
默认值:2.0
必填

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string
默认值:1
必填

A unique identifier for the request.

示例:

"1"

method
enum<string>
默认值:getProgramAccounts
必填

The name of the RPC method to invoke.

可用选项:
getProgramAccounts
示例:

"getProgramAccounts"

params
(string | object)[]
必填

Parameters for the method.

The Solana program public key (address) to query accounts for, as a base-58 encoded string.

示例:

"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"

响应

Successfully retrieved program accounts.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object[]

List of program accounts.