跳转到主要内容
POST
涵盖 SPL Token 和 Token-2022 账户,按代币账户地址排序。也可使用 get_token_accounts 调用。
  • 传入 owner、mint 或两者。ownerAddress 和 mintAddress 可作为别名使用。
  • 除非 options.showZeroBalance 为 true,否则不显示空代币账户。
  • amount 是以基础单位表示的原始余额。
  • limit 默认为 1000,且不能超过 1000。
  • 未传入 page、before 或 after 时,响应中的 cursor 是最后一个账户的地址。将其作为 cursor 传回以获取下一页;token_accounts 为空时停止。
  • 匹配超过 200,000 个代币账户的查询会返回错误,因此对持有者众多的代币,仅用 mint 查询无法生效。请加上 owner,或使用 getTokenLargestAccounts。
  • 消耗 1 积分,并计入套餐的 DAS RPS 限制。
请求配置和错误处理见 RPC 快速入门。计费见积分与限制。 全部 DAS 方法见 DAS API 概览。

授权

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.

可用选项:
getTokenAccounts
示例:

"getTokenAccounts"

params
object
必填

Owner and/or mint, and pagination. Send at least one of owner or mint. Unknown keys are rejected.

响应

Successfully retrieved token accounts.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object

A page of token accounts.