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

# getMultipleCompressedAccounts

> Trả về nhiều tài khoản nén có địa chỉ hoặc hàm băm đã cho.

## Tham số yêu cầu

<ParamField body="addresses" type="array">
  Mảng khóa công khai Solana của các tài khoản nén cần truy xuất
</ParamField>

<ParamField body="hashes" type="array">
  Mảng hàm băm dữ liệu dùng để xác định các tài khoản Solana nén cần truy xuất
</ParamField>


## OpenAPI

````yaml vi/openapi/zk-compression/getMultipleCompressedAccounts.yaml POST /
openapi: 3.0.3
info:
  title: API hàng loạt nén trạng thái Solana
  description: >
    Trình lập chỉ mục Solana nâng cao dành cho các tài khoản nén, sử dụng công
    nghệ nén trạng thái để cho phép lưu trữ dữ liệu hiệu quả và tiết kiệm chi
    phí trên blockchain Solana.

    API này cung cấp khả năng truy xuất hàng loạt được tối ưu hóa cho NFT nén và
    tài khoản token, giúp các ứng dụng mở rộng quy mô hiệu quả

    đồng thời tận dụng công nghệ nén đột phá của Solana, giúp giảm chi phí lưu
    trữ trên chuỗi tới 1000 lần.
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Điểm cuối RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Điểm cuối RPC Devnet
security: []
paths:
  /:
    summary: getMultipleCompressedAccounts
    post:
      description: >
        Truy xuất hiệu quả nhiều tài khoản nén từ blockchain Solana chỉ trong
        một yêu cầu.

        Điểm cuối hàng loạt được tối ưu hóa này cho phép nhà phát triển truy
        xuất nhiều tài khoản được nén trạng thái theo địa chỉ

        hoặc hàm băm trong một thao tác, qua đó giảm số lệnh gọi RPC và chi phí
        mạng. Lý tưởng cho các ứng dụng làm việc với

        bộ sưu tập lớn gồm NFT nén, token hoặc các cấu trúc dữ liệu Solana nén
        khác cần

        truy cập dữ liệu hiệu suất cao và tiết kiệm chi phí.


        Các trường hợp sử dụng chính:

        - Truy xuất hàng loạt dữ liệu bộ sưu tập NFT nén

        - Ứng dụng ví hiển thị nhiều tài sản nén

        - Sàn giao dịch tải siêu dữ liệu NFT nén theo lô

        - Nền tảng phân tích xử lý nhiều token nén

        - Trò chơi truy xuất hiệu quả nhiều tài sản trong trò chơi
      operationId: getMultipleCompressedAccounts
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: Phiên bản của giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: ID dùng để xác định yêu cầu.
                  default: '1'
                method:
                  type: string
                  description: Tên của phương thức cần gọi.
                  enum:
                    - getMultipleCompressedAccounts
                  default: getMultipleCompressedAccounts
                params:
                  type: object
                  description: >
                    Các tham số yêu cầu để truy xuất hàng loạt dữ liệu của nhiều
                    tài khoản Solana nén,

                    hỗ trợ tra cứu bằng địa chỉ hoặc hàm băm mật mã
                  default:
                    addresses: null
                    hashes:
                      - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM
                      - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
                  properties:
                    addresses:
                      type: array
                      items:
                        $ref: '#/components/schemas/SerializablePubkey'
                      nullable: true
                      description: >-
                        Mảng khóa công khai Solana của các tài khoản nén cần
                        truy xuất
                    hashes:
                      type: array
                      items:
                        $ref: '#/components/schemas/Hash'
                      nullable: true
                      description: >-
                        Mảng hàm băm dữ liệu xác định các tài khoản Solana nén
                        cần truy xuất
                  additionalProperties: false
                  example:
                    addresses: null
                    hashes:
                      - 1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM
                      - 1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh
        required: true
      responses:
        '200':
          description: >-
            Đã truy xuất thành công nhiều tài khoản Solana nén trong một thao
            tác hàng loạt
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/AccountList'
                additionalProperties: false
        '400':
          description: >-
            Yêu cầu không hợp lệ - Tham số yêu cầu không hợp lệ hoặc yêu cầu sai
            định dạng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Tham số không hợp lệ
                id: '1'
        '401':
          description: Không được phép - Khóa API không hợp lệ hoặc bị thiếu.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Không được phép
                id: '1'
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Quá nhiều yêu cầu
                id: '1'
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Lỗi nội bộ
                id: '1'
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Dịch vụ không khả dụng
                id: '1'
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Hết thời gian chờ cổng kết nối
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    SerializablePubkey:
      type: string
      description: >-
        Khóa công khai Solana được biểu diễn dưới dạng chuỗi base58, dùng để xác
        định tài khoản nén, cây Merkle và chủ sở hữu.
      default: 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo
      example: 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo
    Hash:
      type: string
      description: >-
        Hàm băm mật mã 32 byte được biểu diễn dưới dạng chuỗi base58, dùng để
        xác minh tính toàn vẹn của dữ liệu tài khoản Solana nén.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
          description: Slot blockchain Solana hiện tại tại thời điểm gửi yêu cầu
    AccountList:
      type: object
      required:
        - items
      properties:
        items:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Account'
            nullable: true
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: Phiên bản giao thức JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: Mã lỗi.
              example: -32602
            message:
              type: string
              description: Thông báo lỗi.
            data:
              type: object
              description: Dữ liệu bổ sung về lỗi.
        id:
          type: string
          description: Mã định danh khớp với yêu cầu.
          example: '1'
    Account:
      type: object
      required:
        - hash
        - owner
        - lamports
        - tree
        - leafIndex
        - seq
        - slotCreated
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Địa chỉ Solana duy nhất của tài khoản nén
        data:
          $ref: '#/components/schemas/AccountData'
          description: Dữ liệu tài khoản nén ở định dạng lưu trữ hiệu quả
        hash:
          $ref: '#/components/schemas/Hash'
          description: Hàm băm mật mã của dữ liệu tài khoản nén dùng để xác minh
        lamports:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Số dư tính bằng lamport liên kết với tài khoản nén
        leafIndex:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Vị trí chỉ mục trong cây Merkle nơi lưu trữ tài khoản nén
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Chương trình Solana sở hữu tài khoản nén này
        seq:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Số thứ tự dùng để theo dõi các bản cập nhật đối với tài khoản nén
        slotCreated:
          $ref: '#/components/schemas/UnsignedInteger'
          description: Slot blockchain Solana tại thời điểm tài khoản nén được tạo
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
          description: Địa chỉ của cây Merkle chứa tài khoản nén này
      additionalProperties: false
    AccountData:
      type: object
      required:
        - discriminator
        - data
        - dataHash
      properties:
        data:
          $ref: '#/components/schemas/Base64String'
        dataHash:
          $ref: '#/components/schemas/Hash'
        discriminator:
          $ref: '#/components/schemas/UnsignedInteger'
      additionalProperties: false
    UnsignedInteger:
      type: integer
      default: 100
      example: 100
      description: >-
        Giá trị số nguyên không âm được dùng cho nhiều tham số trong cấu trúc
        tài khoản Solana nén
    Base64String:
      type: string
      description: Chuỗi được mã hóa base64 chứa dữ liệu tài khoản Solana nén.
      default: SGVsbG8sIFdvcmxkIQ==
      example: SGVsbG8sIFdvcmxkIQ==
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Khóa API Helius của bạn. Bạn có thể nhận khóa miễn phí trong [bảng điều
        khiển](https://dashboard.helius.dev/api-keys).

````