跳转到主要内容
POST
使用 getTokenAccountsWithCursor 按余额从大到小遍历某个 mint 的所有代币账户。该方法由 Ridge DB 驱动。第一页就是头部持有者,因此一次调用即可生成前 50 名表格;继续分页即可导出全部持有者。
  • 每行包含代币账户 address、其 owner 钱包、原始 amount、decimals、uiAmount 和 uiAmountString。
  • limit 默认每页 100。超过 1,000 的值按 1,000 处理。
  • 将 nextCursor 作为 cursor 传回以获取下一页。hasMore 为 false 时停止。满页会将 hasMore 设为 true,因此最后一页可能为空。
  • 结果包含零余额账户,并排在最后。如果只需要持有者,请跳过 amount 为 “0” 的行。
  • changedSince 只返回在该 slot 之后发生变化的账户。
每次调用消耗 1 积分,只计入通用 RPS。 请求配置和错误处理见 RPC 快速入门。计费见积分与限制。

授权

api_key
string
query
必填

请求体

application/json
jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

A unique identifier for the request.

示例:

"1"

method
enum<string>

The name of the RPC method to invoke.

可用选项:
getTokenAccountsWithCursor
示例:

"getTokenAccountsWithCursor"

params
(string | object)[]

The mint, then an optional configuration object.

Token mint address, as a base-58 encoded string.

示例:

"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

响应

Successfully retrieved a page of token accounts for the mint.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object

One page of the mint's token accounts.