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

# getTokenAccounts

> Retrieve all SPL token accounts owned by a wallet address including token balances, mint addresses, and account metadata with pagination

## Request Parameters

<ParamField body="mint" type="string">
  The mint address key.
</ParamField>

<ParamField body="owner" type="string">
  The owner address key.
</ParamField>

<ParamField body="page" type="number">
  The page of results to return.
</ParamField>

<ParamField body="limit" type="number">
  The maximum number of assets to return.
</ParamField>

<ParamField body="cursor" type="string">
  The cursor used for pagination.
</ParamField>

<ParamField body="before" type="string">
  Returns results before the specified cursor.
</ParamField>

<ParamField body="after" type="string">
  Returns results after the specified cursor.
</ParamField>

<ParamField body="options" type="object" />

<ParamField body="options.showZeroBalance" type="boolean">
  If true, show accounts with empty token balances.
</ParamField>


## OpenAPI

````yaml openapi/das-api/getTokenAccounts.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Mainnet RPC endpoint
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC endpoint
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getTokenAccounts
      description: Returns a list of token accounts for a given mint and owner.
      operationId: rpc
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: The version of the JSON-RPC protocol.
                  default: '2.0'
                id:
                  type: string
                  description: An ID to identify the request.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTokenAccounts
                  description: The name of the method to invoke.
                  default: getTokenAccounts
                params:
                  type: object
                  default:
                    owner: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
                  properties:
                    mint:
                      type: string
                      description: The mint address key.
                      example: string
                    owner:
                      type: string
                      description: The owner address key.
                      example: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
                    page:
                      type: integer
                      description: The page of results to return.
                      example: 1
                    limit:
                      type: integer
                      description: The maximum number of assets to return.
                      example: 100
                    cursor:
                      type: string
                      description: The cursor used for pagination.
                    before:
                      type: string
                      description: Returns results before the specified cursor.
                    after:
                      type: string
                      description: Returns results after the specified cursor.
                    options:
                      type: object
                      properties:
                        showZeroBalance:
                          type: boolean
                          description: If true, show accounts with empty token balances.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  last_indexed_slot:
                    type: integer
                    description: >-
                      All data up to and including this slot is guaranteed to
                      have been indexed.
                    example: 365750752
                  total:
                    type: integer
                    description: The number of results found for the request.
                    example: 2
                  limit:
                    type: integer
                    description: The maximum number of results requested.
                    example: 100
                  cursor:
                    type: string
                    description: The cursor used for pagination.
                  token_accounts:
                    type: array
                    description: An array of token accounts.
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: The address of the token account.
                        mint:
                          type: string
                          description: The address of the mint account.
                        owner:
                          type: string
                          description: The address of the token account owner.
                        amount:
                          type: integer
                          description: Number of tokens in the account.
                        delegated_amount:
                          type: integer
                          description: Number of delegated tokens in the account.
                        frozen:
                          type: boolean
                          description: If the account is frozen.
                        burnt: false
        '400':
          description: >-
            Bad Request. The server could not understand the request due to
            invalid syntax.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32602
                      message:
                        type: string
                        example: Invalid request parameters.
                  id:
                    type: string
                    example: '1'
        '401':
          description: >-
            Unauthorized. The client must authenticate itself to get the
            requested response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32001
                      message:
                        type: string
                        example: Authentication failed. Missing or invalid API key.
                  id:
                    type: string
                    example: '1'
        '403':
          description: Forbidden. The client does not have access rights to the content.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32003
                      message:
                        type: string
                        example: You do not have permission to access this resource.
                  id:
                    type: string
                    example: '1'
        '404':
          description: Not Found. The server can not find the requested resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32004
                      message:
                        type: string
                        example: The requested resource was not found.
                  id:
                    type: string
                    example: '1'
        '429':
          description: >-
            Too Many Requests. The user has sent too many requests in a given
            amount of time.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32029
                      message:
                        type: string
                        example: Rate limit exceeded. Please try again later.
                  id:
                    type: string
                    example: '1'
        '500':
          description: >-
            Internal Server Error. The server has encountered a situation it
            doesn't know how to handle.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    example: '2.0'
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: -32000
                      message:
                        type: string
                        example: An unexpected error occurred on the server.
                  id:
                    type: string
                    example: '1'
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Your Helius API key. You can get one for free in the
        [dashboard](https://dashboard.helius.dev/api-keys).

````