跳转到主要内容
POST
使用 getTokenAccountsByDelegateV2 分页查询所有将某个地址设为委托人的代币账户。该方法由 Ridge DB 驱动。它接受与 getTokenAccountsByDelegate 相同的参数,并增加分页选项,因此被数千个账户授权的委托人可以分页加载,而不是一次返回超大响应。
  • mint 和 programId 必须且只能传入一个。programId 必须是 SPL Token 或 Token-2022 程序。
  • 每页 limit 为 1 到 10,000(默认 1,000)。将 nextCursor 作为 cursor 传回,并保持相同的筛选条件和选项,直到 hasMore 为 false。
  • 每页都包含 totalCount,即匹配账户的精确数量。
  • excludeZero 跳过空账户,并按余额从大到小返回。不使用时,账户按地址顺序返回。
  • changedSince 只返回在该 slot 之后发生变化的账户。
  • 未指定 encoding 时,账户数据以 base64 返回。
每次调用消耗 1 积分,并计入 getProgramAccounts 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.

可用选项:
getTokenAccountsByDelegateV2
示例:

"getTokenAccountsByDelegateV2"

params
string · object · object[]

Parameters for paging through token accounts approved to a delegate.

Delegate address to query, as a base-58 encoded string. Returns token accounts that approved this address as their delegate.

示例:

"4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T"

响应

Successfully retrieved a page of token accounts by delegate.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object

One page of token accounts approved to the delegate.