跳转到主要内容
POST
getTokenAccounts
curl --request POST \
  --url 'https://mainnet.helius-rpc.com/?api-key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "getTokenAccounts",
  "params": {
    "owner": "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY"
  }
}
'
{
  "last_indexed_slot": 365750752,
  "total": 2,
  "limit": 100,
  "cursor": "<string>",
  "token_accounts": [
    {
      "address": "<string>",
      "mint": "<string>",
      "owner": "<string>",
      "amount": 123,
      "delegated_amount": 123,
      "frozen": true,
      "burnt": "<unknown>"
    }
  ]
}

授权

api-key
string
query
必填

您的 Helius API 密钥。您可以在仪表板中免费获取一个。

请求体

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

JSON-RPC 协议的版本。

可用选项:
2.0
id
string
默认值:1
必填

用于标识请求的 ID。

示例:

"1"

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

要调用的方法名称。

可用选项:
getTokenAccounts
params
object
必填

响应

成功响应

last_indexed_slot
integer

保证所有数据都已索引到此槽位及之前的所有数据。

示例:

365750752

total
integer

请求找到的结果数量。

示例:

2

limit
integer

请求的最大结果数量。

示例:

100

cursor
string

用于分页的游标。

token_accounts
object[]

一个包含代币账户的数组。