getTokenAccountsByDelegate
Solana node API
getTokenAccountsByDelegate | Solana
The Solana getTokenAccountsByDelegate method returns all SPL token accounts that have been delegated to a given account. On Solana.
POST
getTokenAccountsByDelegate
The SolanaDocumentation Index
Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
Use this file to discover all available pages before exploring further.
getTokenAccountsByDelegate method returns all SPL token accounts that have been delegated to a given account.
This method is useful for querying which token accounts a specific address has been granted spending authority over via the SPL token approve instruction.
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
pubkey(string, required) — the pubkey of the delegate account to query, as a base58 encoded string.filter(object, required) — filter results by token mint or program ID. One of:mint(string) — the pubkey of the specific token mint to limit accounts to.programId(string) — the pubkey of the Token program that owns the accounts (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DAfor SPL Token,TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEbfor Token-2022).
config(object, optional) — configuration object containing:encoding(string) — encoding for account data. Values:base58,base64,base64+zstd,jsonParsed. Default:base64.jsonParsedreturns parsed JSON data for known token account structures.commitment(string) — the commitment level.
Response
The response includes aresult object with:
context— an object containingslot.value— an array of objects, each containing:pubkey(string) — the token account address.account— an object with:lamports(integer) — the account balance in lamports.owner(string) — the program that owns the account.data— the account data, encoded as requested. WithjsonParsed, returns the parsed token account structure includingmint,owner,tokenAmount,delegate, anddelegatedAmount.executable(boolean) — whether the account is executable.rentEpoch(integer) — the epoch at which rent is next due.
Use case
A common use case forgetTokenAccountsByDelegate is in DeFi protocols that use token delegation. For example, a lending protocol can query all token accounts delegated to its program to display a user’s approved spending limits, or an analytics tool can track delegation patterns across the network.Last modified on May 18, 2026