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

# getMultipleAccounts

> Trả về thông tin tài khoản cho một danh sách Pubkey.

<Info>
  **Tính năng mới**: `getMultipleAccounts` hiện hỗ trợ tham số `changedSinceSlot` để cập nhật gia tăng. Khi được chỉ định, phương thức chỉ trả về các tài khoản đã được sửa đổi tại hoặc sau số slot đã cho. Đối với các tài khoản tồn tại nhưng không thay đổi kể từ slot được chỉ định, phản hồi sẽ chứa `status: "unchanged"`.
</Info>

## Tham số yêu cầu

<ParamField body="address" type="array" required>
  Mảng địa chỉ tài khoản Solana (tối đa 100) cần tìm nạp trong một yêu cầu hàng loạt được tối ưu hóa.
</ParamField>

<ParamField body="commitment" type="string">
  Mức độ commitment cho yêu cầu.

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

<ParamField body="minContextSlot" type="number">
  Slot tối thiểu mà tại đó yêu cầu có thể được đánh giá.
</ParamField>

<ParamField body="dataSlice" type="object">
  Yêu cầu một phần dữ liệu của tài khoản.
</ParamField>

<ParamField body="dataSlice.length" type="number">
  Số byte cần trả về.
</ParamField>

<ParamField body="dataSlice.offset" type="number">
  Độ lệch byte để bắt đầu đọc.
</ParamField>

<ParamField body="encoding" type="string">
  Định dạng mã hóa cho dữ liệu tài khoản được trả về.

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

<ParamField body="changedSinceSlot" type="number">
  Chỉ trả về các tài khoản đã được sửa đổi tại hoặc sau số slot này. Đối với các tài khoản tồn tại nhưng không thay đổi kể từ slot được chỉ định, phản hồi sẽ chứa trạng thái "unchanged".
</ParamField>


## OpenAPI

````yaml vi/openapi/rpc-http/getMultipleAccounts.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API truy xuất dữ liệu tài khoản Solana theo lô được tối ưu hóa, giúp truy
    cập hiệu quả nhiều tài khoản blockchain trong một yêu cầu duy nhất với các
    tùy chọn mã hóa có thể cấu hình.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
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:
  /:
    post:
      tags:
        - RPC
      summary: getMultipleAccounts
      description: >
        Truy xuất dữ liệu cho nhiều tài khoản Solana trong một yêu cầu theo lô
        hiệu quả.

        API được tối ưu hóa hiệu suất này giúp giảm chi phí mạng bằng cách truy
        xuất đồng thời tối đa 100 tài khoản,

        hỗ trợ nhiều kiểu mã hóa dữ liệu, bao gồm phân tích cú pháp JSON cho các
        loại chương trình đã biết.

        Phù hợp với DApp, ví và dịch vụ cần truy cập nhiều số dư token, siêu dữ
        liệu NFT,

        trạng thái chương trình hoặc bất kỳ tổ hợp dữ liệu tài khoản on-chain
        nào với độ trễ và mức sử dụng băng thông tối thiểu.
      operationId: getMultipleAccounts
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: Phiên bản giao thức JSON-RPC.
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Mã định danh duy nhất cho yêu cầu.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: Tên của phương thức RPC cần gọi.
                  enum:
                    - getMultipleAccounts
                  example: getMultipleAccounts
                  default: getMultipleAccounts
                params:
                  type: array
                  description: Các tham số của phương thức.
                  default:
                    - - vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg
                      - 4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA
                  items:
                    oneOf:
                      - type: array
                        description: >-
                          Mảng địa chỉ tài khoản Solana (tối đa 100) cần truy
                          xuất trong một yêu cầu theo lô được tối ưu hóa.
                        items:
                          type: string
                        example:
                          - vines1vzrYbzLMRdu58ou5XTby4qAqVRLmqo36NKPTg
                          - 4fYNw3dojWmQ4dXtSGE9epjRGy9pFSx62YypT7avPYvA
                      - type: object
                        description: >-
                          Các tùy chọn cấu hình nâng cao để tùy chỉnh việc truy
                          xuất dữ liệu tài khoản theo lô.
                        properties:
                          commitment:
                            type: string
                            description: Mức commitment cho yêu cầu.
                            enum:
                              - confirmed
                              - finalized
                              - processed
                            example: finalized
                          minContextSlot:
                            type: integer
                            description: >-
                              Slot tối thiểu mà yêu cầu có thể được đánh giá tại
                              đó.
                            example: 1000
                          dataSlice:
                            type: object
                            description: Yêu cầu một phần dữ liệu của tài khoản.
                            properties:
                              length:
                                type: integer
                                description: Số byte cần trả về.
                                example: 50
                              offset:
                                type: integer
                                description: Độ lệch byte để bắt đầu đọc.
                                example: 0
                          encoding:
                            type: string
                            description: >-
                              Định dạng mã hóa cho dữ liệu tài khoản được trả
                              về.
                            enum:
                              - jsonParsed
                              - base58
                              - base64
                              - base64+zstd
                            example: base58
                          changedSinceSlot:
                            type: integer
                            description: >-
                              Chỉ trả về các tài khoản đã được sửa đổi tại hoặc
                              sau số slot này. Với các tài khoản tồn tại nhưng
                              không thay đổi kể từ slot đã chỉ định, phản hồi sẽ
                              chứa trạng thái "unchanged".
                            example: 464175999
      responses:
        '200':
          description: Đã truy xuất thành công thông tin chi tiết của tài khoản.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: Phiên bản giao thức JSON-RPC.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Mã định danh khớp với yêu cầu.
                    example: '1'
                  result:
                    type: object
                    description: Thông tin tài khoản kèm ngữ cảnh.
                    properties:
                      context:
                        type: object
                        description: Ngữ cảnh của phản hồi.
                        properties:
                          apiVersion:
                            type: string
                            description: Phiên bản API của phản hồi.
                            example: 2.0.15
                          slot:
                            type: integer
                            description: Slot nơi dữ liệu được truy xuất.
                            example: 341197247
                      value:
                        type: array
                        description: Mảng thông tin chi tiết tài khoản.
                        items:
                          oneOf:
                            - type: 'null'
                              description: Null nếu tài khoản không tồn tại.
                            - type: object
                              description: Thông tin chi tiết tài khoản.
                              properties:
                                lamports:
                                  type: integer
                                  description: Số lamport được gán cho tài khoản.
                                  example: 88849814690250
                                owner:
                                  type: string
                                  description: >-
                                    Pubkey được mã hóa Base-58 của chương trình
                                    mà tài khoản được gán cho.
                                  example: '11111111111111111111111111111111'
                                data:
                                  type: array
                                  description: >-
                                    Dữ liệu tài khoản ở định dạng nhị phân được
                                    mã hóa hoặc JSON.
                                  items:
                                    type: string
                                  example:
                                    - ''
                                    - base58
                                executable:
                                  type: boolean
                                  description: >-
                                    Cho biết tài khoản có chứa chương trình hay
                                    không.
                                  example: false
                                rentEpoch:
                                  type: integer
                                  description: >-
                                    Epoch tiếp theo mà tài khoản này sẽ phải trả
                                    phí thuê.
                                  example: 18446744073709552000
                                space:
                                  type: integer
                                  description: Kích thước dữ liệu của tài khoản.
                                  example: 0
                            - type: object
                              description: >-
                                Phản hồi chỉ có trạng thái khi tài khoản tồn tại
                                nhưng không thay đổi kể từ slot đã chỉ định.
                              properties:
                                status:
                                  type: string
                                  description: >-
                                    Trạng thái cho biết tài khoản không thay đổi
                                    kể từ slot đã chỉ định.
                                  enum:
                                    - unchanged
                                  example: unchanged
        '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ệ
                  data:
                    additionalInfo: >-
                      Vui lòng kiểm tra các tham số yêu cầu và đảm bảo chú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
                  data:
                    additionalInfo: Vui lòng xác minh khóa API rồi thử lại.
                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
                  data:
                    additionalInfo: >-
                      Bạn đã vượt quá số lượng yêu cầu cho phép. Vui lòng chờ
                      rồi thử lại sau.
                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ộ
                  data:
                    additionalInfo: >-
                      Đã xảy ra lỗi không mong muốn trên máy chủ. Vui lòng thử
                      lại sau hoặc liên hệ với bộ phận hỗ trợ.
                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
                  data:
                    additionalInfo: >-
                      Dịch vụ hiện không khả dụng. Vui lòng thử lại sau hoặc
                      liên hệ với bộ phận hỗ trợ.
                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
                  data:
                    additionalInfo: >-
                      Yêu cầu đã hết thời gian chờ. Vui lòng thử lại sau hoặc
                      liên hệ với bộ phận hỗ trợ.
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    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'
  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).

````