getTokenAccountsByOwner

POSTTokensOperator+

Returns every token account owned by a given wallet, optionally filtered to one mint or token program.

Try itSends a real request from your browser to the selected region.
POST
/

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.

Plans & rate limitsOperator and above
FreeNot included
Operator5/s
Blade Runner10/s
Nexus30/s

Parameters

params is a JSON array, with values in this order: owner, filter, config.

1ownerstringrequired

Wallet address that owns the token accounts, base-58 encoded.

2filterobjectrequired

Exactly one of mint or programId — the two are mutually exclusive.

Show one ofOne of
Option 1object
Show propertiesProperties
mintstringrequired

Restricts results to token accounts for this specific mint, base-58 encoded.

Option 2object
Show propertiesProperties
programIdstringrequired

Restricts results to token accounts owned by this token program (the classic SPL Token program or Token-2022), base-58 encoded.

3configobject

Optional configuration.

Show propertiesProperties
commitmentstringdefault: "finalized"

Bank state to read the accounts from.

Allowed values:finalizedconfirmedprocessed
encodingstringdefault: "base58"

How to encode each account's data. jsonParsed decodes the token account fields directly and suits most cases here.

Allowed values:base58base64base64+zstdjsonParsed
dataSliceobject

Returns only a byte range of each account's data. Not valid with jsonParsed.

Show propertiesProperties
offsetintegerrequired
lengthintegerrequired
minContextSlotinteger

Minimum slot the node must have processed before answering.

Result

resultobject

Matching token accounts, wrapped with context.

Show propertiesProperties
contextobjectrequired
Show propertiesProperties
slotinteger
apiVersionstring
valueobject[]required
Show each itemEach item
pubkeystring

Token account address, base-58 encoded.

accountobject
Show propertiesProperties
lamportsinteger
ownerstring

The token program that owns this account (not the wallet that controls its tokens).

executableboolean
rentEpochinteger
spaceinteger
dataany

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 programId instead of mint returns every token account under that program, potentially many; mint scopes the result to a single known token.
  • A wallet with no token account for the given mint returns an empty value array, not an error and not a null entry.