getTokenAccountsByDelegate

All the specifications for getTokenAccountsByDelegate RPC Method on Solana

Returns all SPL Token accounts by approved Delegate.

Parameters required for this RPC call

  • The pubkey of account delegate to query, as base-58 encoded string.

  • A JSON object with one of the following fields:

    • mint: Pubkey of the specific token Mint to limit accounts to, as base-58 encoded string; or

    • programId: Pubkey of the Token program that owns the accounts, as base-58 encoded string

  • configuration : This contains the following parameters, all are optional fields.

    • commitment: The commitment describes how finalized a block is at that point in time. Commitment levels processed, confirmed and finalized are supported, defaults to finalized.

    • dataSlice: Request a slice of the account's data.

      • length: <usize> - number of bytes to return

      • offset: <usize> - byte offset from which to start reading

    • minContextSlot: The minimum slot that the request can be evaluated at.

    • encoding: Encoding format for each returned transaction. The supported options are json, jsonParsed, base58 and base64. You can know more about Parsed responses more on Solana docs.

curl https://rpc.shyft.to?api_key=YOUR-API-KEY -s -X \
  POST -H "Content-Type: application/json" -d ' 
   {
     "jsonrpc": "2.0",
     "id": 1,
     "method": "getTokenAccountBalance",
     "params": [
       "7fUAJdStEuGbc3sM84cKRL6yYaaSstyLSU4ve5oovLS7",
       {
         "commitment": "finalized"
       }
     ]
   }
 '

Last updated

Was this helpful?