> ## 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

> Ambil semua akun token SPL yang dimiliki oleh alamat dompet, termasuk saldo token, alamat mint, dan metadata akun, dengan paginasi

## Parameter Permintaan

<ParamField body="mint" type="string">
  Kunci alamat mint.
</ParamField>

<ParamField body="owner" type="string">
  Kunci alamat pemilik.
</ParamField>

<ParamField body="page" type="number">
  Halaman hasil yang akan dikembalikan.
</ParamField>

<ParamField body="limit" type="number">
  Jumlah maksimum aset yang akan dikembalikan.
</ParamField>

<ParamField body="cursor" type="string">
  Kursor yang digunakan untuk paginasi.
</ParamField>

<ParamField body="before" type="string">
  Mengembalikan hasil sebelum kursor yang ditentukan.
</ParamField>

<ParamField body="after" type="string">
  Mengembalikan hasil setelah kursor yang ditentukan.
</ParamField>

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

<ParamField body="options.showZeroBalance" type="boolean">
  Jika true, tampilkan akun dengan saldo token kosong.
</ParamField>


## OpenAPI

````yaml id/openapi/das-api/getTokenAccounts.yaml POST /
openapi: 3.1.0
info:
  title: API RPC Solana
  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: Titik akhir RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Titik akhir RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getTokenAccounts
      description: Mengembalikan daftar akun token untuk mint dan pemilik tertentu.
      operationId: rpc
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Versi protokol JSON-RPC.
                  default: '2.0'
                id:
                  type: string
                  description: ID untuk mengidentifikasi permintaan.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTokenAccounts
                  description: Nama metode yang akan dipanggil.
                  default: getTokenAccounts
                params:
                  type: object
                  default:
                    owner: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
                  properties:
                    mint:
                      type: string
                      description: Kunci alamat mint.
                      example: string
                    owner:
                      type: string
                      description: Kunci alamat pemilik.
                      example: 86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY
                    page:
                      type: integer
                      description: Halaman hasil yang akan dikembalikan.
                      example: 1
                    limit:
                      type: integer
                      description: Jumlah maksimum aset yang akan dikembalikan.
                      example: 100
                    cursor:
                      type: string
                      description: Kursor yang digunakan untuk paginasi.
                    before:
                      type: string
                      description: Mengembalikan hasil sebelum kursor yang ditentukan.
                    after:
                      type: string
                      description: Mengembalikan hasil setelah kursor yang ditentukan.
                    options:
                      type: object
                      properties:
                        showZeroBalance:
                          type: boolean
                          description: Jika true, tampilkan akun dengan saldo token kosong.
      responses:
        '200':
          description: Respons berhasil
          content:
            application/json:
              schema:
                type: object
                properties:
                  last_indexed_slot:
                    type: integer
                    description: >-
                      Semua data hingga dan termasuk slot ini dijamin telah
                      diindeks.
                    example: 365750752
                  total:
                    type: integer
                    description: Jumlah hasil yang ditemukan untuk permintaan tersebut.
                    example: 2
                  limit:
                    type: integer
                    description: Jumlah maksimum hasil yang diminta.
                    example: 100
                  cursor:
                    type: string
                    description: Kursor yang digunakan untuk paginasi.
                  token_accounts:
                    type: array
                    description: Larik akun token.
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: Alamat akun token.
                        mint:
                          type: string
                          description: Alamat akun mint.
                        owner:
                          type: string
                          description: Alamat pemilik akun token.
                        amount:
                          type: integer
                          description: Jumlah token dalam akun.
                        delegated_amount:
                          type: integer
                          description: Jumlah token yang didelegasikan dalam akun.
                        frozen:
                          type: boolean
                          description: Menunjukkan apakah akun dibekukan.
                        burnt: false
        '400':
          description: >-
            Permintaan Tidak Valid. Server tidak dapat memahami permintaan
            karena sintaks yang tidak valid.
          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: Parameter permintaan tidak valid.
                  id:
                    type: string
                    example: '1'
        '401':
          description: >-
            Tidak Terotorisasi. Klien harus mengautentikasi dirinya untuk
            memperoleh respons yang diminta.
          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: >-
                          Autentikasi gagal. Kunci API tidak ada atau tidak
                          valid.
                  id:
                    type: string
                    example: '1'
        '403':
          description: Dilarang. Klien tidak memiliki hak akses ke konten tersebut.
          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: >-
                          Anda tidak memiliki izin untuk mengakses sumber daya
                          ini.
                  id:
                    type: string
                    example: '1'
        '404':
          description: >-
            Tidak Ditemukan. Server tidak dapat menemukan sumber daya yang
            diminta.
          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: Sumber daya yang diminta tidak ditemukan.
                  id:
                    type: string
                    example: '1'
        '429':
          description: >-
            Terlalu Banyak Permintaan. Pengguna telah mengirim terlalu banyak
            permintaan dalam jangka waktu tertentu.
          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: Batas laju terlampaui. Silakan coba lagi nanti.
                  id:
                    type: string
                    example: '1'
        '500':
          description: >-
            Kesalahan Internal Server. Server mengalami situasi yang tidak
            diketahui cara penanganannya.
          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: Terjadi kesalahan tak terduga pada server.
                  id:
                    type: string
                    example: '1'
      security:
        - ApiKeyQuery: []
components:
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Kunci API Helius Anda. Anda dapat memperolehnya secara gratis di
        [dasbor](https://dashboard.helius.dev/api-keys).

````