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

# getTokenAccountsByDelegate

> Mengembalikan semua akun SPL Token berdasarkan delegasi yang disetujui.

## Parameter Permintaan

<ParamField body="address" type="string" required>
  Alamat Solana (kunci publik) dari delegasi yang telah diberi wewenang untuk mengelola akun token.
</ParamField>

<ParamField body="mint" type="string">
  Alamat mint token tertentu untuk memfilter akun yang didelegasikan berdasarkan jenis token tertentu.
</ParamField>

<ParamField body="programId" type="string">
  ID program token tertentu (biasanya program SPL Token) untuk memfilter akun yang didelegasikan.
</ParamField>

<ParamField body="commitment" type="string">
  Tingkat komitmen untuk permintaan.

  * `confirmed`
  * `finalized`
  * `processed`
</ParamField>

<ParamField body="minContextSlot" type="number">
  Slot minimum tempat permintaan dapat dievaluasi.
</ParamField>

<ParamField body="dataSlice" type="object">
  Meminta sebagian data akun.
</ParamField>

<ParamField body="dataSlice.length" type="number">
  Jumlah byte yang akan dikembalikan.
</ParamField>

<ParamField body="dataSlice.offset" type="number">
  Offset byte untuk mulai membaca.
</ParamField>

<ParamField body="encoding" type="string">
  Format pengodean untuk data Akun.

  * `base58`
  * `base64`
  * `base64+zstd`
  * `jsonParsed`
</ParamField>


## OpenAPI

````yaml id/openapi/rpc-http/getTokenAccountsByDelegate.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API Solana tingkat lanjut untuk meminta otorisasi token delegasi, yang
    memungkinkan aplikasi mengambil semua akun token SPL yang telah memberikan
    izin tertentu kepada alamat pihak ketiga.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Endpoint RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Endpoint RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getTokenAccountsByDelegate
      description: >
        Mengambil semua akun token SPL yang telah mendelegasikan kewenangan
        kepada alamat Solana tertentu.

        API canggih ini mengidentifikasi semua akun token yang telah memberikan
        izin pembelanjaan atau pengelolaan

        kepada aplikasi pihak ketiga, dompet, atau alamat delegasi lainnya.
        Sangat penting

        untuk pemantauan keamanan, pelacakan delegasi, dan aplikasi yang perlu
        menemukan akun

        token yang diizinkan untuk dikelola atau dibelanjakan. Mendukung
        pemfilteran berdasarkan

        jenis token tertentu dan tingkat otorisasi delegasi, dengan data yang
        telah diuraikan untuk memudahkan integrasi.
      operationId: getTokenAccountsByDelegate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Versi protokol JSON-RPC.
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Pengidentifikasi unik untuk permintaan.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getTokenAccountsByDelegate
                  description: Nama metode RPC yang akan dipanggil.
                  example: getTokenAccountsByDelegate
                  default: getTokenAccountsByDelegate
                params:
                  type: array
                  description: Parameter untuk meminta akun token berdasarkan delegasi.
                  default:
                    - 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                    - programId: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                    - encoding: jsonParsed
                  items:
                    oneOf:
                      - type: string
                        description: >-
                          Alamat Solana (kunci publik) milik delegasi yang telah
                          diberi otorisasi untuk mengelola akun token.
                        example: 4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                      - type: object
                        description: >-
                          Konfigurasi filter untuk mempersempit hasil ke jenis
                          token atau program tertentu.
                        properties:
                          mint:
                            type: string
                            description: >-
                              Alamat pencetakan token tertentu untuk memfilter
                              akun yang didelegasikan berdasarkan jenis token
                              tertentu.
                            example: 3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                          programId:
                            type: string
                            description: >-
                              ID program token tertentu (biasanya program SPL
                              Token) untuk memfilter akun yang didelegasikan.
                            example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                      - type: object
                        description: Objek konfigurasi.
                        properties:
                          commitment:
                            type: string
                            description: Tingkat komitmen untuk permintaan.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: Slot minimum tempat permintaan dapat dievaluasi.
                            example: 1000
                          dataSlice:
                            type: object
                            description: Meminta sebagian data akun.
                            properties:
                              length:
                                type: integer
                                description: Jumlah byte yang akan dikembalikan.
                                example: 10
                              offset:
                                type: integer
                                description: Offset byte tempat pembacaan dimulai.
                                example: 0
                          encoding:
                            type: string
                            description: Format pengodean untuk data Akun.
                            enum:
                              - base58
                              - base64
                              - base64+zstd
                              - jsonParsed
                            example: jsonParsed
      responses:
        '200':
          description: Berhasil mengambil akun token berdasarkan delegasi.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Versi protokol JSON-RPC.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Pengidentifikasi yang cocok dengan permintaan.
                    example: '1'
                  result:
                    type: object
                    description: Konteks dan detail akun.
                    properties:
                      context:
                        type: object
                        description: Konteks respons.
                        properties:
                          slot:
                            type: integer
                            description: Slot tempat data diambil.
                            example: 1114
                      value:
                        type: array
                        description: Daftar akun token.
                        items:
                          type: object
                          properties:
                            pubkey:
                              type: string
                              description: >-
                                Pubkey akun sebagai string yang dikodekan dengan
                                base-58.
                              example: 28YTZEwqtMHWrhWcvv34se7pjS7wctgqzCPB3gReCFKp
                            account:
                              type: object
                              description: Detail akun token.
                              properties:
                                lamports:
                                  type: integer
                                  description: Jumlah lamport yang ditetapkan ke akun.
                                  example: 1726080
                                owner:
                                  type: string
                                  description: >-
                                    Pubkey program yang menerima penetapan akun
                                    ini.
                                  example: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                                data:
                                  type: object
                                  description: Data status token yang terkait dengan akun.
                                  properties:
                                    program:
                                      type: string
                                      description: Nama program.
                                      example: spl-token
                                    parsed:
                                      type: object
                                      description: Data token yang telah diuraikan.
                                      properties:
                                        info:
                                          type: object
                                          description: Informasi akun token.
                                          properties:
                                            tokenAmount:
                                              type: object
                                              description: Detail jumlah token.
                                              properties:
                                                amount:
                                                  type: string
                                                  description: Saldo mentah tanpa desimal.
                                                  example: '1'
                                                decimals:
                                                  type: integer
                                                  description: Jumlah angka desimal.
                                                  example: 1
                                                uiAmount:
                                                  type: number
                                                  description: >-
                                                    Saldo dalam format yang mudah dibaca
                                                    pengguna.
                                                  example: 0.1
                                                uiAmountString:
                                                  type: string
                                                  description: Saldo sebagai string.
                                                  example: '0.1'
                                            delegate:
                                              type: string
                                              description: >-
                                                Alamat Solana yang telah diberi
                                                otorisasi delegasi untuk membelanjakan
                                                atau mengelola token.
                                              example: >-
                                                4Nd1mBQtrMJVYVfKf2PJy9NZUZdTAsp7D4xWLs4gDB4T
                                            delegatedAmount:
                                              type: object
                                              description: >-
                                                Jumlah token yang telah diotorisasi
                                                untuk dibelanjakan oleh delegasi atas
                                                nama pemilik.
                                              properties:
                                                amount:
                                                  type: string
                                                  description: Saldo mentah tanpa desimal.
                                                  example: '1'
                                                decimals:
                                                  type: integer
                                                  description: Jumlah angka desimal.
                                                  example: 1
                                                uiAmount:
                                                  type: number
                                                  description: >-
                                                    Saldo dalam format yang mudah dibaca
                                                    pengguna.
                                                  example: 0.1
                                                uiAmountString:
                                                  type: string
                                                  description: Saldo sebagai string.
                                                  example: '0.1'
                                        state:
                                          type: string
                                          description: Status akun token.
                                          example: initialized
                                        isNative:
                                          type: boolean
                                          description: >-
                                            Menunjukkan apakah akun menyimpan SOL
                                            native.
                                          example: false
                                        mint:
                                          type: string
                                          description: Pubkey pencetakan token.
                                          example: >-
                                            3wyAj7Rt1TWVPZVteFJPLa26JmLvdb1CAKEFZm3NY75E
                                        owner:
                                          type: string
                                          description: Pubkey pemilik akun.
                                          example: >-
                                            CnPoSPKXu7wJqxe59Fs72tkBeALovhsCxYeFwPCQH9TD
                                    space:
                                      type: integer
                                      description: Ruang yang dialokasikan untuk akun.
                                      example: 165
                                executable:
                                  type: boolean
                                  description: Menunjukkan apakah akun berisi program.
                                  example: false
                                rentEpoch:
                                  type: integer
                                  description: >-
                                    Epoch saat akun berikutnya harus membayar
                                    sewa.
                                  example: 4
                                space:
                                  type: integer
                                  description: Ukuran data akun.
                                  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: >-
            Permintaan Buruk - Parameter permintaan tidak valid atau format
            permintaan salah.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Parameter tidak valid
                id: '1'
        '401':
          description: Tidak Diotorisasi - Kunci API tidak valid atau tidak tersedia.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Tidak diotorisasi
                id: '1'
        '429':
          description: Terlalu Banyak Permintaan - Batas laju terlampaui.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Terlalu banyak permintaan
                id: '1'
        '500':
          description: Kesalahan Server Internal - Terjadi kesalahan pada server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Kesalahan internal
                id: '1'
        '503':
          description: Layanan Tidak Tersedia - Layanan untuk sementara tidak tersedia.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Layanan tidak tersedia
                id: '1'
        '504':
          description: Waktu Tunggu Gateway Habis - Waktu tunggu permintaan habis.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Waktu tunggu gateway habis
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Versi protokol JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Kode kesalahan.
              example: -32602
            message:
              type: string
              description: Pesan kesalahan.
            data:
              type: object
              description: Data tambahan tentang kesalahan.
        id:
          type: string
          description: Pengidentifikasi yang cocok dengan permintaan.
          example: '1'
  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).

````