RPC MethodsHTTPgetTokenAccountsByDelegate

Token

getTokenAccountsByDelegate

Returns all SPL Token accounts by approved delegate.

Parameters

pubkeystring required

Pubkey of account delegate to query, as base-58 encoded string.

filterobject required

Either { mint: "<pubkey>" } or { programId: "<pubkey>" }.

configobject optional

Configuration object.

commitmentstring

Commitment level.

encodingstring

Encoding for account data.

dataSliceobject

Limit the returned account data.

minContextSlotnumber

The minimum slot.

Result

array

Array of JSON objects with pubkey and account information.

Example

Request
JSON
curl "https://eu.fluxrpc.com?key=<your-API-key>" -s -X POST -H "Content-Type: application/json" -d '
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getTokenAccountsByDelegate",
  "params": [
    "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T",
    { "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" },
    { "commitment": "finalized", "encoding": "jsonParsed" }
  ]
}'
Response
JSON
{
"jsonrpc": "2.0",
"result": {
"context": {
"slot": 1114
},
"value": []
},
"id": 1
}