getTokenAccountsByDelegate

POSTTokensAll plans

Returns every token account that has approved a given address as its delegate.

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

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.

PlansAll plans
FreeIncluded
OperatorIncluded
Blade RunnerIncluded
NexusIncluded

Parameters

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

1delegatestringrequired

Delegate address to search for, 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, 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 delegate and amount fields.

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. Same account shape as getTokenAccountsByOwner.

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.

executableboolean
rentEpochinteger
spaceinteger
dataany

With jsonParsed, data.parsed.info includes mint, owner (the token account's actual owner wallet), delegate, delegatedAmount and tokenAmount.

Notes

  • owner in data.parsed.info is the token account's controlling wallet, not the delegate searched for; the delegate appears only in delegate and delegatedAmount.
  • An empty value array 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.