Skip to main content
getTokenAccountsByOwnerV2 returns the SPL Token and Token-2022 accounts owned by a wallet, one page at a time, ordered by pubkey. Use it instead of getTokenAccountsByOwner when a wallet can hold more than 10,000 token accounts or you want bounded page sizes. Send it to the complete ThorEdge RPC URL like any other method.

Parameters

string
required
Wallet pubkey as a base-58 string.
object
required
Exactly one of:
  • { "mint": "<pubkey>" }: token accounts for one mint.
  • { "programId": "<pubkey>" }: all token accounts owned by that token program. Must be the SPL Token or Token-2022 program id.
An unknown mint returns an empty page, not an error.
object
Options for the query. All fields are optional.
filters and changedSinceSlot are not supported on this method.

Response

object
{ "slot": <int> }: the indexed slot the page reflects.
object

Paginate

Repeat the request with paginationKey set to the value you received, keeping the filter, encoding, and limit unchanged, until paginationKey is null.

Errors