跳转到主要内容
POST
获取钱包在过去某个 slot 或时间戳的代币持仓。每个代币账户都会返回其 mint、金额以及确定该余额的那次变化。同时省略 slot 和 timestamp 则返回当前持仓。
  • slot 和 timestamp(Unix 秒)最多设置一个。
  • 用 mint 筛选单个代币,用 excludeZeroBalance: true 跳过空账户。
  • 每页最多 500 个账户(limit,默认 100)。传入返回的 paginationToken 获取下一页,并保持相同的 owner、mint、时间点和 excludeZeroBalance。最后一页没有 paginationToken。
  • 很久以前关闭的代币账户可能不在此列表中。请用 getHistoricalTokenAccountBalances 直接读取。
  • 金额仅为代币数量,不包含租金 lamports。
费用:每次调用 2 积分,计入通用 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>
默认值:getHistoricalTokenAccountsByOwner
必填

The name of the RPC method to invoke.

可用选项:
getHistoricalTokenAccountsByOwner
示例:

"getHistoricalTokenAccountsByOwner"

params
object[]
必填

A single configuration object with the wallet, point in time, filters and paging.

响应

A page of historical token accounts for the wallet.

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.