Skip to main content
POST
getTokenAccountsByOwner
Need to track only new tokens? Use changedSince to fetch accounts modified after a specific slot, perfect for incremental portfolio updates. Want to filter out dust? The excludeZero parameter automatically hides empty token accounts, keeping your results clean and reducing bandwidth.
High Load ConsiderationsThis endpoint streams all token accounts directly to your client. While this works great for most wallets, it can return errors during high load or when querying owners with millions of token accounts, such as protocol-owned accounts.Need better reliability? Use getTokenAccountsByOwnerV2 instead. The V2 method includes pagination support, making it more efficient and reliable for large wallets and high-traffic scenarios.
请求配置和错误处理见 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>
默认值:getTokenAccountsByOwner
必填

The name of the RPC method to invoke.

可用选项:
getTokenAccountsByOwner
示例:

"getTokenAccountsByOwner"

params
string · object · object[]
必填

Parameters for querying token accounts owned by a specific public key.

Solana wallet address (pubkey) of the account owner to query token holdings for, as a base-58 encoded string.

示例:

"A1TMhSGzQxMr1TboBKtgixKz1sS6REASMxPo1qsyTSJd"

响应

Successfully retrieved token accounts by owner.

jsonrpc
enum<string>

The JSON-RPC protocol version.

可用选项:
2.0
示例:

"2.0"

id
string

Identifier matching the request.

示例:

"1"

result
object

Context and account details.