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

# getTokenAccountsByOwner

> Returns all token accounts owned by `wallet`, optionally filtered by `mint` or `programId`. The gateway **fans out across endpoints and unions the results** to avoid stale-index partial responses.




## OpenAPI

````yaml openapi-spec/solana-rpc/getTokenAccountsByOwner.yaml post /
openapi: 3.0.3
info:
  title: Raze Solana RPC — getTokenAccountsByOwner
  description: >
    List SPL-token accounts owned by a wallet.


    Returns all token accounts owned by `wallet`, optionally filtered by `mint`
    or `programId`. The gateway **fans out across endpoints and unions the
    results** to avoid stale-index partial responses.


    Sent as JSON-RPC 2.0 over HTTPS to any regional gateway (`POST /`). The
    gateway

    proxies to a load-balanced pool of upstream validators with method-aware
    hedging.
  version: 1.0.0
servers:
  - url: https://rpc.raze.bot
    description: Raze global RPC edge — GeoDNS routes to the nearest region automatically
security: []
paths:
  /:
    post:
      summary: getTokenAccountsByOwner
      description: >
        Returns all token accounts owned by `wallet`, optionally filtered by
        `mint` or `programId`. The gateway **fans out across endpoints and
        unions the results** to avoid stale-index partial responses.
      operationId: getTokenAccountsByOwner
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Request'
            examples:
              default:
                summary: List SPL-token accounts owned by a wallet.
                value:
                  jsonrpc: '2.0'
                  id: 1
                  method: getTokenAccountsByOwner
                  params:
                    - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                    - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                    - encoding: jsonParsed
      responses:
        '200':
          description: |
            JSON-RPC response. Inspect `result` (success) or `error` (failure).
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/SuccessResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
              examples:
                success:
                  summary: Successful response
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    result:
                      context:
                        slot: 418263083
                      value: []
                methodNotFound:
                  summary: No upstream supports this method
                  value:
                    jsonrpc: '2.0'
                    id: 1
                    error:
                      code: -32601
                      message: Method not found
components:
  schemas:
    Request:
      type: object
      required:
        - jsonrpc
        - method
        - params
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
          example: '2.0'
        id:
          oneOf:
            - type: integer
            - type: string
          example: 1
        method:
          type: string
          enum:
            - getTokenAccountsByOwner
          example: getTokenAccountsByOwner
        params:
          type: array
          description: |
            `[wallet, filter, config?]` — `filter` is `{mint}` or `{programId}`
          items: {}
          example:
            - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
            - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
            - encoding: jsonParsed
    SuccessResponse:
      type: object
      required:
        - jsonrpc
        - result
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        result: {}
        id:
          oneOf:
            - type: integer
            - type: string
          example: 1
    ErrorResponse:
      type: object
      required:
        - jsonrpc
        - error
      properties:
        jsonrpc:
          type: string
          example: '2.0'
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: integer
              description: |
                JSON-RPC error code. Common values:
                - `-32601` — Method not found (no upstream supports it)
                - `-32602` — Invalid params
                - `-32603` — Upstream error / all endpoints failed
                - `-32005` — Rate limited
            message:
              type: string
        id:
          oneOf:
            - type: integer
            - type: string
          example: 1

````