Returns SPL Token accounts whose approved delegate matches the supplied address.
$ curl https://api.devnet.solana.com -s -X \> POST -H "Content-Type: application/json" -d '> {> "jsonrpc": "2.0",> "id": 1,> "method": "getTokenAccountsByDelegate",> "params": [> "9mMBg1qaUaQdht6Q7r5T5VirRzJbNAyquKTq96FyR4UC",> {> "mint": "Gh9ZwEmdLJ8DscKNTkTqPbNwLNNBjuSzaG9Vp2KGtKJr"> },> {> "commitment": "finalized",> "encoding": "jsonParsed"> }> ]> }> '
params
stringrequired
Pubkey of account delegate to query, as base-58 encoded string
objectrequired
A JSON object with one of the following fields:
objectoptional
Configuration object containing the following fields:
result
Response
{"jsonrpc": "2.0","result": {"context": { "apiVersion": "3.1.8", "slot": 1114 },"value": [{"pubkey": "28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp","account": {"data": {"program": "spl-token","parsed": {"info": {"tokenAmount": {"amount": "1","decimals": 1,"uiAmount": 0.1,"uiAmountString": "0.1"},"delegate": "4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T","delegatedAmount": {"amount": "1","decimals": 1,"uiAmount": 0.1,"uiAmountString": "0.1"},"state": "initialized","isNative": false,"mint": "3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E","owner": "CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD"},"type": "account"},"space": 165},"executable": false,"lamports": 1726080,"owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA","rentEpoch": 4,"space": 165}}]},"id": 1}
object
RpcResponse object containing:
Is this page helpful?