getTokenAccountsByDelegate - Solana

getTokenAccountsByDelegate. Retrieves all token accounts for which a specified delegate is authorized

getTokenAccountsByDelegate - solana [Value: 10CU]
Retrieves all token accounts for which a specified delegate is authorized, assisting developers in managing delegated token activities
Use cases

Use cases

  • Retrieve token accounts associated with a specific delegate
  • Monitor delegated token accounts for management purposes
  • Analyze tokens controlled by delegates for auditing
Constraints

Constraints

  • Limited to accounts linked to the specified delegate
  • Requires accurate and up-to-date network data
  • API rate limits may impact data retrieval frequency
Get started
Unlock Access to 50+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://solana.drpc.org \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc": "2.0","id": 1,"method": "getTokenAccountsByDelegate","params": ["4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",{"programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"encoding": "jsonParsed"}]}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "result": {
    "context": {
      "slot": 98123569
    },
    "value": [
      {
        "pubkey": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
        "account": {
          "data": {
            "parsed": {
              "info": {
                "mint": "1YDQ35V8g68FGvcT85haHwAXv1U7XMzuc4mZeEXfrjE",
                "owner": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
                "tokenAmount": {
                  "amount": "1000000",
                  "decimals": 6,
                  "uiAmount": 1.0,
                  "uiAmountString": "1.0"
                }
              },
              "type": "account"
            },
            "program": "spl-token",
            "space": 165
          },
          "executable": false,
          "lamports": 2039280,
          "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
          "rentEpoch": 42
        }
      }
    ]
  },
  "id": 1
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
accountPublicKeystring
The public key of the account to query.
encodingstring
Specifies the data encoding for the returned account information
dataSliceobject
Limits the returned account data based on the specified offset and length fields. Available only for "base58", "base64", or "base64+zstd" encodings.
objectobject
array
mintstring
The public key of the specific token Mint, encoded in base-58 format, to restrict accounts to
programIdstring
The public key of the Token program ID that owns the accounts, encoded in base-58 format.
commitmentstring
The level of commitment required for the query
  • finalized - The node will query the most recent block confirmed by supermajority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized
  • confirmed - The node will query the most recent block that has been voted on by supermajority of the cluster
  • processed - The node will query its most recent block. Note that the block may not be complete

Response

200
Returns the token accounts for a specified mint, including their addresses and balances, providing a snapshot of the largest holders of that token

Response params

object
idinteger
jsonrpcstring
resultstring
object
contextobject
Contains information about the current state of the program
object
slotinteger
The slot number used to retrieve the fee calculator.
apiVersionstring
The version of the Solana RPC API being used
valueobject
object
accountstring
The address used to store assets on the Solana blockchain.
object
spaceinteger
The amount of storage space required to store the token account.
datastring
Encoded data to be passed to the instruction.
object
programstring
The program managing the token.
typestring
parsedarray
List of parsed instructions executed in the block's transactions.
object
delegatestring
Public address of the delegate for retrieving account tokens, encoded as base-58.
isNativeboolean
Indicates if the token is native to the Solana blockchain
mintstring
Information about the creation of new tokens
ownerstring
The base-58 encoded public key of the program assigned to this account
statestring
Current state of the token account
infoarray
Additional details about the transactions.
object
tokenAmountstring
Balance of tokens in the account.
amountstring
Raw token supply, without decimals, as a u64 integer.
decimalsinteger
Number of decimal places the token uses.
uiAmountstring
Total token supply with mint-prescribed decimals (DEPRECATED).
uiAmountStringstring
Total token supply as a string, with mint-prescribed decimals.
delegateAmountobject
Configuration for delegate amount.
object
tokenAmountstring
Balance of tokens in the account.
amountstring
Raw token supply, without decimals, as a u64 integer.
decimalsinteger
Number of decimal places the token uses.
uiAmountstring
Total token supply with mint-prescribed decimals (DEPRECATED).
uiAmountStringstring
Total token supply as a string, with mint-prescribed decimals.
ownerstring
Base-58 encoded public key of the program assigned to this account
datastring
Data associated with the account, either as encoded binary data or in JSON format, depending on the specified encoding. Format: [data, encoding] or JSON object
executableboolean
dicates if the account contains a program and is read-only.
rentEpochinteger
The epoch at which this account will next owe rent.