get Token Accounts By Delegate
Returns every token account that has approved a given address as its delegate.
getTokenAccountsByDelegate returns every SPL Token or Token-2022 account that has approved the given address as its delegate, via Approve or ApproveChecked. As with getTokenAccountsByOwner, the search requires narrowing with either mint or programId.
A marketplace, lending protocol or trading bot that receives delegated authority uses this to enumerate which token accounts it can move on a user's behalf.
Parameters
params is a JSON array, with values in this order: delegate, filter, config.
Delegate address to search for, 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, base-58 encoded.
Optional configuration.
Show propertiesProperties
Bank state to read the accounts from.
finalizedconfirmedprocessedHow to encode each account's data. jsonParsed decodes the delegate and amount fields.
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. Same account shape as getTokenAccountsByOwner.
Show propertiesProperties
Show propertiesProperties
Show each itemEach item
Token account address, base-58 encoded.
Show propertiesProperties
The token program that owns this account.
With jsonParsed, data.parsed.info includes mint, owner (the token account's actual owner wallet), delegate, delegatedAmount and tokenAmount.
Notes
ownerindata.parsed.infois the token account's controlling wallet, not the delegate searched for; the delegate appears only indelegateanddelegatedAmount.- An empty
valuearray means no token account currently has this address approved as a delegate; this is a common result, since delegation is the exception for most token accounts. - A token account only ever has one active delegate at a time; approving a new delegate replaces the previous one.