> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# getTokenAccountsByDelegate

> Returns all SPL Token accounts that have been delegated to a specific address. This method allows you to find token accounts where spending or management authority has been granted to a delegate, useful for tracking authorized token operations and delegated permissions.



## OpenAPI

````yaml gettokenaccountsbydelegate post /
openapi: 3.1.0
info:
  title: Solana RPC
  version: 1.0.0
  description: Solana RPC HTTP method reference.
servers:
  - url: https://rpc-mainnet.solanatracker.io
    description: Mainnet RPC endpoint
security: []
paths:
  /:
    post:
      summary: Run `getTokenAccountsByDelegate`
      description: >-
        Returns all SPL Token accounts that have been delegated to a specific
        address. This method allows you to find token accounts where spending or
        management authority has been granted to a delegate, useful for tracking
        authorized token operations and delegated permissions.
      operationId: gettokenaccountsbydelegate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  allOf:
                    - type: string
                      enum:
                        - '2.0'
                      description: The JSON-RPC protocol version.
                      example: '2.0'
                      default: '2.0'
                id:
                  allOf:
                    - type: string
                      description: A unique identifier for the request.
                      example: '1'
                      default: '1'
                method:
                  allOf:
                    - type: string
                      enum:
                        - getTokenAccountsByDelegate
                      description: The name of the RPC method to invoke.
                      example: getTokenAccountsByDelegate
                      default: getTokenAccountsByDelegate
                params:
                  allOf:
                    - type: array
                      description: Parameters for querying token accounts by delegate.
                      default:
                        - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                        - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                        - encoding: jsonParsed
                      items:
                        oneOf:
                          - type: string
                            description: >-
                              Solana address (public key) of the delegate that
                              has been authorized to manage token accounts.
                            example: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                          - type: object
                            description: >-
                              Filter configuration to narrow results to specific
                              token types or programs.
                            properties:
                              mint:
                                type: string
                                description: >-
                                  Specific token mint address to filter
                                  delegated accounts by a particular token type.
                                example: 3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                              programId:
                                type: string
                                description: >-
                                  Specific token program ID (typically SPL Token
                                  program) to filter delegated accounts.
                                example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                          - type: object
                            description: Configuration object.
                            properties:
                              commitment:
                                type: string
                                description: The commitment level for the request.
                                enum:
                                  - confirmed
                                  - finalized
                                  - processed
                                example: finalized
                              minContextSlot:
                                type: integer
                                description: >-
                                  The minimum slot that the request can be
                                  evaluated at.
                                example: 1000
                              dataSlice:
                                type: object
                                description: Request a slice of the account's data.
                                properties:
                                  length:
                                    type: integer
                                    description: Number of bytes to return.
                                    example: 10
                                  offset:
                                    type: integer
                                    description: Byte offset from which to start reading.
                                    example: 0
                              encoding:
                                type: string
                                description: Encoding format for Account data.
                                enum:
                                  - base58
                                  - base64
                                  - base64+zstd
                                  - jsonParsed
                                example: jsonParsed
              required:
                - jsonrpc
                - id
                - method
                - params
            examples:
              example:
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenAccountsByDelegate
                  params:
                    - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                    - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                    - encoding: jsonParsed
      responses:
        '200':
          description: Successfully retrieved token accounts by delegate.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                  result:
                    allOf:
                      - type: object
                        description: Context and account details.
                        properties:
                          context:
                            type: object
                            description: Context of the response.
                            properties:
                              slot:
                                type: integer
                                description: Slot in which the data was fetched.
                                example: 1114
                          value:
                            type: array
                            description: List of token accounts.
                            items:
                              type: object
                              properties:
                                pubkey:
                                  type: string
                                  description: Account Pubkey as a base-58 encoded string.
                                  example: 28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp
                                account:
                                  type: object
                                  description: Token account details.
                                  properties:
                                    lamports:
                                      type: integer
                                      description: >-
                                        Number of lamports assigned to the
                                        account.
                                      example: 1726080
                                    owner:
                                      type: string
                                      description: >-
                                        Pubkey of the program this account has
                                        been assigned to.
                                      example: >-
                                        TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                                    data:
                                      type: object
                                      description: >-
                                        Token state data associated with the
                                        account.
                                      properties:
                                        program:
                                          type: string
                                          description: Program name.
                                          example: spl-token
                                        parsed:
                                          type: object
                                          description: Parsed token data.
                                          properties:
                                            info:
                                              type: object
                                              description: Token account information.
                                              properties:
                                                tokenAmount:
                                                  type: object
                                                  description: Token amount details.
                                                  properties:
                                                    amount:
                                                      type: string
                                                      description: Raw balance without decimals.
                                                      example: '1'
                                                    decimals:
                                                      type: integer
                                                      description: Number of decimals.
                                                      example: 1
                                                    uiAmount:
                                                      type: number
                                                      description: Balance in user-friendly format.
                                                      example: 0.1
                                                    uiAmountString:
                                                      type: string
                                                      description: Balance as a string.
                                                      example: '0.1'
                                                delegate:
                                                  type: string
                                                  description: >-
                                                    The Solana address that has been granted
                                                    delegate authorization to spend or
                                                    manage tokens.
                                                  example: >-
                                                    4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                                                delegatedAmount:
                                                  type: object
                                                  description: >-
                                                    The amount of tokens the delegate has
                                                    been authorized to spend on behalf of
                                                    the owner.
                                                  properties:
                                                    amount:
                                                      type: string
                                                      description: Raw balance without decimals.
                                                      example: '1'
                                                    decimals:
                                                      type: integer
                                                      description: Number of decimals.
                                                      example: 1
                                                    uiAmount:
                                                      type: number
                                                      description: Balance in user-friendly format.
                                                      example: 0.1
                                                    uiAmountString:
                                                      type: string
                                                      description: Balance as a string.
                                                      example: '0.1'
                                            state:
                                              type: string
                                              description: Token account state.
                                              example: initialized
                                            isNative:
                                              type: boolean
                                              description: >-
                                                Indicates if the account holds native
                                                SOL.
                                              example: false
                                            mint:
                                              type: string
                                              description: Pubkey of the token mint.
                                              example: >-
                                                3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                                            owner:
                                              type: string
                                              description: Pubkey of the account owner.
                                              example: >-
                                                CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD
                                        space:
                                          type: integer
                                          description: Space allocated for the account.
                                          example: 165
                                    executable:
                                      type: boolean
                                      description: >-
                                        Indicates if the account contains a
                                        program.
                                      example: false
                                    rentEpoch:
                                      type: integer
                                      description: >-
                                        Epoch at which the account will next owe
                                        rent.
                                      example: 4
                                    space:
                                      type: integer
                                      description: Data size of the account.
                                      example: 165
              examples:
                response:
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 1114
                      value:
                        - pubkey: 28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp
                          account:
                            lamports: 1726080
                            owner: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                            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
                            rentEpoch: 4
                            space: 165
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32602
                      message: Invalid params
                    id: 1
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32001
                      message: Unauthorized
                    id: 1
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32005
                      message: Too many requests
                    id: 1
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32603
                      message: Internal error
                    id: 1
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32002
                      message: Service unavailable
                    id: 1
        '504':
          description: Gateway Timeout - The request timed out.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    allOf:
                      - type: string
                        enum:
                          - '2.0'
                        description: The JSON-RPC protocol version.
                        example: '2.0'
                  error:
                    allOf:
                      - type: object
                        properties:
                          code:
                            type: integer
                            description: The error code.
                            example: -32602
                          message:
                            type: string
                            description: The error message.
                          data:
                            type: object
                            description: Additional data about the error.
                  id:
                    allOf:
                      - type: string
                        description: Identifier matching the request.
                        example: '1'
                refIdentifier: '#/components/schemas/ErrorResponse'
              examples:
                example:
                  value:
                    jsonrpc: '2.0'
                    error:
                      code: -32003
                      message: Gateway timeout
                    id: 1
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key

````