# getTokenAccountsByDelegate

{% hint style="info" %}
A previosly disabled method, this RPC method is now indexed via our Hyperion service to allow for ultra low latency responses.
{% endhint %}

## getTokenAccountsByDelegate — Token accounts by delegate

> Returns all SPL Token accounts by approved delegate. This method is essential for finding token accounts where a specific address has been granted delegation permissions to spend tokens on behalf of the owner.\
> \*\*Parameters\*\*\
> \
> 0\. \`delegate\` (required) — Delegate pubkey, base-58.\
> 1\. \`filter\` (required) — Filter by mint or program id (one of).\
> 2\. \`config\` (optional) — Optional configuration object. Every field is optional; omit the entire object to use defaults.<br>

```json
{"openapi":"3.0.3","info":{"title":"Solana RPC: getTokenAccountsByDelegate","version":"1.0.0"},"tags":[{"name":"Account","description":"Solana RPC account method."}],"servers":[{"url":"https://public.rpc.solanavibestation.com","description":"Public endpoint (rate-limited, no auth)"},{"url":"https://lite.rpc.solanavibestation.com","description":"Lite tier"},{"url":"https://basic.rpc.solanavibestation.com","description":"Basic tier"},{"url":"https://ultra.rpc.solanavibestation.com","description":"Ultra tier"},{"url":"https://elite.rpc.solanavibestation.com","description":"Elite tier"},{"url":"https://epic.rpc.solanavibestation.com","description":"Epic tier"},{"url":"https://basic.swqos.solanavibestation.com","description":"Basic tier with Stake-Weighted QoS"},{"url":"https://ultra.swqos.solanavibestation.com","description":"Ultra tier with Stake-Weighted QoS"},{"url":"https://elite.swqos.solanavibestation.com","description":"Elite tier with Stake-Weighted QoS"}],"security":[{},{"AuthHeader":[]},{"URLParameter":[]}],"components":{"securitySchemes":{"AuthHeader":{"type":"apiKey","in":"header","name":"Authorization","description":"Pass `Authorization: <api-key>` on each request."},"URLParameter":{"type":"apiKey","in":"query","name":"api_key","description":"Pass `?api_key=<api-key>` on the URL."}},"schemas":{"Commitment":{"type":"string","enum":["processed","confirmed","finalized"],"default":"finalized","description":"How finalized a block is at query time:\n- `processed`: most recent block, may be skipped\n- `confirmed`: block confirmed by supermajority of cluster\n- `finalized`: block finalized by the cluster (>2/3 stake)"},"Encoding":{"type":"string","enum":["json","jsonParsed","base58","base64","base64+zstd"],"description":"Encoding for transaction or account data."},"JsonRpcEnvelope":{"type":"object","required":["jsonrpc","id"],"description":"Base envelope of every JSON-RPC 2.0 response.","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Echoed request id."}}},"Context":{"type":"object","description":"RPC context block returned alongside most account-level results.","required":["slot"],"properties":{"slot":{"type":"integer","format":"int64"},"apiVersion":{"type":"string"}}},"AccountInfo":{"type":"object","description":"On-chain account state.","nullable":true,"required":["lamports","owner","executable","rentEpoch","data"],"properties":{"lamports":{"type":"integer","format":"int64","description":"Balance in lamports."},"owner":{"type":"string","description":"Base-58 program id that owns the account."},"executable":{"type":"boolean"},"rentEpoch":{"type":"integer","format":"int64"},"space":{"type":"integer","description":"Data length in bytes."},"data":{"description":"Account data; encoding depends on request encoding.","oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}},{"type":"object","additionalProperties":true}]}}},"JsonRpcErrorResponse":{"type":"object","required":["jsonrpc","id","error"],"description":"JSON-RPC 2.0 error response.","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"id":{"oneOf":[{"type":"string"},{"type":"integer"}]},"error":{"$ref":"#/components/schemas/JsonRpcError"}}},"JsonRpcError":{"type":"object","required":["code","message"],"description":"Structured JSON-RPC error.","properties":{"code":{"type":"integer","description":"Numeric error code per JSON-RPC 2.0 spec. Common values:\n- `-32700` Parse error\n- `-32600` Invalid Request\n- `-32601` Method not found\n- `-32602` Invalid params\n- `-32603` Internal error\n- `-32003` Unauthorized\n- `-32005` Too Many Requests\n- `-32015` Transaction version not supported\n"},"message":{"type":"string"},"data":{"type":"object","additionalProperties":true}}}},"responses":{"UnauthorizedError":{"description":"Authentication required or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"ForbiddenError":{"description":"Insufficient permissions for the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"TooManyRequestsError":{"description":"Rate limit exceeded for this tier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}},"InternalServerError":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JsonRpcErrorResponse"}}}}}},"paths":{"/":{"post":{"operationId":"getTokenAccountsByDelegate","summary":"getTokenAccountsByDelegate — Token accounts by delegate","tags":["Account"],"description":"Returns all SPL Token accounts by approved delegate. This method is essential for finding token accounts where a specific address has been granted delegation permissions to spend tokens on behalf of the owner.\n**Parameters**\n\n0. `delegate` (required) — Delegate pubkey, base-58.\n1. `filter` (required) — Filter by mint or program id (one of).\n2. `config` (optional) — Optional configuration object. Every field is optional; omit the entire object to use defaults.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["jsonrpc","id","method","params"],"properties":{"jsonrpc":{"type":"string","enum":["2.0"],"description":"JSON-RPC protocol version."},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Request identifier echoed back in the response."},"method":{"type":"string","enum":["getTokenAccountsByDelegate"],"description":"Must be `getTokenAccountsByDelegate`."},"params":{"type":"array","description":"Positional parameters. Each item below corresponds to one position in the array, in order.","minItems":2,"maxItems":3,"items":{"anyOf":[{"title":"delegate","type":"string","description":"Delegate pubkey, base-58."},{"title":"filter","type":"object","description":"Filter the result set. Provide exactly one of `mint` or `programId`.","properties":{"mint":{"type":"string","description":"Filter to a specific token mint address (base-58)."},"programId":{"type":"string","description":"Filter to a token program (base-58). Typically the SPL Token or Token-2022 program id."}}},{"title":"config (optional)","type":"object","description":"Optional configuration object. Every field is optional; omit the entire object to use defaults.","properties":{"commitment":{"$ref":"#/components/schemas/Commitment"},"minContextSlot":{"type":"integer","format":"int64","description":"Minimum slot at which the request can be evaluated. The RPC node will reject the request with a `MinContextSlotNotReached` error if its current root is below this value. Use this for read-after-write consistency in multi-step workflows."},"encoding":{"$ref":"#/components/schemas/Encoding"}}}]}}}}}}},"responses":{"200":{"description":"Successful `getTokenAccountsByDelegate` response.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/JsonRpcEnvelope"},{"type":"object","required":["result"],"properties":{"result":{"type":"object","required":["context","value"],"properties":{"context":{"$ref":"#/components/schemas/Context"},"value":{"type":"array","items":{"type":"object","properties":{"pubkey":{"type":"string"},"account":{"$ref":"#/components/schemas/AccountInfo"}}}}}}}}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/TooManyRequestsError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.solanavibestation.com/developers/solana-rpc/http-methods/gettokenaccountsbydelegate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
