Skip to main content
POST
/
9de47db917d4f69168e3fed02217d15b
getTokenAccountsByOwner
curl --request POST \
  --url https://nd-326-444-187.p2pify.com/9de47db917d4f69168e3fed02217d15b \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getTokenAccountsByOwner",
  "params": [
    "CEXq1uy9y15PL2Wb4vDQwQfcJakBGjaAjeuR2nKLj8dk",
    {
      "mint": "8wXtPeU6557ETkp9WHFY1n1EcU6NxDvbAggHGsMYiHsB"
    },
    {
      "encoding": "jsonParsed"
    }
  ]
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
Not available on the Developer planThe method is available only on the paid plans. Per-method rate limit: 80 RPS across all regions. See Solana method limits.
The Solana getTokenAccountsByOwner method retrieves a list of accounts owned by a specified wallet, filtered by their associated token. This method is useful for identifying all accounts associated with a particular owner and a specific token, allowing for a comprehensive view of token distribution and ownership.
The interactive example fetches the GME tokens owned by an account on Solana mainnet.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  1. ownerPubkey (string, required) — the base-58 encoded public key of the account owner to query.
  2. filter (object, required) — filter results by token mint or program ID. Must include exactly one of:
    • mint (string) — the base-58 encoded public key of a specific token mint to limit accounts to.
    • programId (string) — the base-58 encoded public key of the Token program that owns the accounts (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA for SPL Token, TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb for Token-2022).
  3. config (object, optional) — configuration object containing:
    • commitment (string) — the level of commitment desired for the query.
    • minContextSlot (integer) — the minimum slot at which the request can be evaluated.
    • dataSlice (object) — request a slice of the account’s data with length and offset fields. Only available for non-jsonParsed encodings.
    • encoding (string) — the format of the returned account data. Values: base58, base64, base64+zstd, jsonParsed. With jsonParsed, returns parsed token account data including mint, owner, token amount, delegate, and state.

Response

  • context — an object containing slot (the slot at which the data was fetched) and apiVersion.
  • value — an array of objects, each containing:
    • pubkey (string) — the token account address as a base-58 encoded string.
    • account — an object with:
      • lamports (u64) — number of lamports assigned to this account.
      • owner (string) — base-58 encoded public key of the program that owns this account.
      • data — account data. With jsonParsed encoding, returns a {program, parsed, space} object where parsed.info contains: mint, owner, tokenAmount (with amount, decimals, uiAmount, uiAmountString), delegate, delegatedAmount, state (initialized or frozen), isNative, rentExemptReserve, closeAuthority, and extensions (for Token-2022 accounts).
      • executable (boolean) — whether the account contains a program.
      • rentEpoch (u64) — the epoch at which this account will next owe rent.
      • space (u64) — the data size of the account in bytes.

Use Case

A practical use case for getTokenAccountsByOwner is for wallet interfaces or financial tracking applications to list all accounts associated with a particular owner and token type. This can be especially useful for assessing the distribution of tokens across different accounts and for transaction history analysis.

Body

application/json
id
integer
default:1
jsonrpc
string
default:2.0
method
string
default:getTokenAccountsByOwner
params
array

Response

200 - application/json

Token accounts by owner details

jsonrpc
string
id
integer
result
object
Last modified on April 17, 2026