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

# getTokenSupply

> getTokenSupply mengembalikan total pasokan token SPL apa pun di Solana sebagai jumlah mentah beserta desimal dan string yang mudah ditampilkan di UI — untuk penghitungan kapitalisasi pasar dan jumlah token yang beredar.

## Parameter Permintaan

<ParamField body="address" type="string" required>
  Alamat mint token Solana yang metrik pasokannya ingin diambil (pengidentifikasi unik token SPL).
</ParamField>

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

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


## OpenAPI

````yaml id/openapi/rpc-http/getTokenSupply.yaml POST /
openapi: 3.1.0
info:
  title: API RPC Solana
  version: 1.0.0
  description: >-
    API analitik tokenomik untuk mengambil metrik sirkulasi saat ini dan total
    suplai bagi token SPL atau aset fungibel apa pun di blockchain Solana.
  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: getTokenSupply
      description: >
        Ambil metrik suplai token yang komprehensif untuk token SPL apa pun di
        blockchain Solana.

        API tokenomik penting ini menyediakan data yang akurat dan real-time
        tentang suplai token yang

        beredar, jumlah total pencetakan, dan konfigurasi desimal. Sangat
        penting untuk dasbor analitik token,

        aplikasi DeFi, perhitungan kapitalisasi pasar, metrik protokol, dan
        platform perdagangan yang memerlukan

        informasi suplai token yang andal. Mendukung semua jenis token SPL,
        termasuk token fungibel dan

        token komunitas, dengan pemformatan desimal yang tepat untuk tampilan
        yang akurat.
      operationId: getTokenSupply
      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:
                    - getTokenSupply
                  description: Nama metode RPC yang akan dipanggil.
                  example: getTokenSupply
                  default: getTokenSupply
                params:
                  type: array
                  description: Parameter untuk mengkueri suplai token.
                  default:
                    - 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
                  items:
                    oneOf:
                      - type: string
                        description: >-
                          Alamat pencetakan token Solana yang metrik suplainya
                          akan diambil (pengidentifikasi unik token SPL).
                        example: 7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU
                      - type: object
                        description: Objek konfigurasi.
                        properties:
                          commitment:
                            type: string
                            description: Tingkat komitmen untuk permintaan.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
      responses:
        '200':
          description: Suplai token berhasil diambil.
          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 suplai token.
                    properties:
                      context:
                        type: object
                        description: Konteks respons.
                        properties:
                          slot:
                            type: integer
                            description: Slot tempat data diambil.
                            example: 1114
                      value:
                        type: object
                        description: Detail suplai token.
                        properties:
                          amount:
                            type: string
                            description: >-
                              Total suplai mentah token Solana dalam bentuk
                              string bilangan bulat presisi tanpa pemformatan
                              desimal.
                            example: '100000'
                          decimals:
                            type: integer
                            description: >-
                              Jumlah tempat desimal yang ditentukan oleh token
                              untuk merepresentasikan suplai secara akurat.
                            example: 2
                          uiAmount:
                            type: number
                            description: >-
                              Suplai token yang mudah dibaca manusia dengan
                              pemformatan desimal yang tepat (tidak digunakan
                              lagi).
                            example: 1000
                          uiAmountString:
                            type: string
                            description: >-
                              Representasi string kanonis dari total suplai
                              token dengan jumlah tempat desimal yang benar.
                            example: '1000'
              examples:
                responseExample:
                  value:
                    jsonrpc: '2.0'
                    id: '1'
                    result:
                      context:
                        slot: 1114
                      value:
                        amount: '100000'
                        decimals: 2
                        uiAmount: 1000
                        uiAmountString: '1000'
        '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 Terotorisasi - Kunci API tidak valid atau tidak ada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Tidak terotorisasi
                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 tidak tersedia untuk sementara.
          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 permintaan telah 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 bisa mendapatkannya secara gratis di
        [dasbor](https://dashboard.helius.dev/api-keys).

````