get Token Accounts By Owner
Returns every token account owned by a given wallet, optionally filtered to one mint or token program.
getTokenAccountsByOwner returns every SPL Token or Token-2022 account a wallet controls, narrowed by either a specific mint or a programId; no single call lists every mint a wallet holds.
Parameters
params is a JSON array, with values in this order: owner, filter, config.
Wallet address that owns the token accounts, base-58 encoded.
Exactly one of mint or programId — the two are mutually exclusive.
Show one ofOne of
Show propertiesProperties
Restricts results to token accounts for this specific mint, base-58 encoded.
Show propertiesProperties
Restricts results to token accounts owned by this token program (the classic SPL Token program or Token-2022), base-58 encoded.
Optional configuration.
Show propertiesProperties
Bank state to read the accounts from.
finalizedconfirmedprocessedHow to encode each account's data. jsonParsed decodes the token account fields directly and suits most cases here.
base58base64base64+zstdjsonParsedReturns only a byte range of each account's data. Not valid with jsonParsed.
Show propertiesProperties
Minimum slot the node must have processed before answering.
Result
Matching token accounts, wrapped with context.
Show propertiesProperties
Show propertiesProperties
Show each itemEach item
Token account address, base-58 encoded.
Show propertiesProperties
The token program that owns this account (not the wallet that controls its tokens).
Same shape as getAccountInfo. With jsonParsed, data.parsed.info includes mint, owner (the wallet), state and tokenAmount.
Notes
- Not available on the Free plan.
- Passing
programIdinstead ofmintreturns every token account under that program, potentially many;mintscopes the result to a single known token. - A wallet with no token account for the given mint returns an empty
valuearray, not an error and not a null entry.