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.
commitmentstringCommitment level.
encodingstringEncoding for account data.
dataSliceobjectLimit the returned account data.
minContextSlotnumberThe minimum slot.
Result
arrayArray of JSON objects with pubkey and account information.
Example
Request
JSONcurl "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
}