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

# getCompressedAccountsByOwner

> Trả về tất cả tài khoản nén ZK Compression thuộc sở hữu của một địa chỉ Solana nhất định — hỗ trợ phân trang qua con trỏ, cắt lát dữ liệu và các vị từ bộ lọc để truy vấn hiệu quả.

## Tham số yêu cầu

<ParamField body="cursor" type="string">
  Một hàm băm 32 byte được biểu diễn dưới dạng chuỗi base58.
</ParamField>

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

<ParamField body="dataSlice.length" type="number" required />

<ParamField body="dataSlice.offset" type="number" required />

<ParamField body="filters" type="array" />

<ParamField body="limit" type="number" />

<ParamField body="owner" type="string" required default="11111114d3RrygbPdAtMuFnDmzsN8T5fYKVQ7FVr7">
  Một khóa công khai Solana được biểu diễn dưới dạng chuỗi base58.
</ParamField>


## OpenAPI

````yaml vi/openapi/zk-compression/getCompressedAccountsByOwner.yaml POST /
openapi: 3.0.3
info:
  title: photon-indexer
  description: Trình lập chỉ mục Solana cho tính năng nén tổng quát
  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: getCompressedAccountsByOwner
    post:
      description: Truy xuất thông tin getCompressedAccountsByOwner
      operationId: getCompressedAccountsByOwner
      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 để 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:
                    - getCompressedAccountsByOwner
                  default: getCompressedAccountsByOwner
                params:
                  type: object
                  required:
                    - owner
                  properties:
                    cursor:
                      allOf:
                        - $ref: '#/components/schemas/Hash'
                      nullable: true
                    dataSlice:
                      allOf:
                        - $ref: '#/components/schemas/DataSlice'
                      nullable: true
                    filters:
                      type: array
                      items:
                        $ref: '#/components/schemas/FilterSelector'
                    limit:
                      allOf:
                        - $ref: '#/components/schemas/Limit'
                      nullable: true
                    owner:
                      $ref: '#/components/schemas/SerializablePubkey'
                  additionalProperties: false
        required: true
      responses:
        '200':
          description: >-
            Đã truy xuất thành công các tài khoản nén theo chủ sở hữu từ
            blockchain Solana
          content:
            application/json:
              schema:
                type: object
                required:
                  - context
                  - value
                properties:
                  context:
                    $ref: '#/components/schemas/Context'
                  value:
                    $ref: '#/components/schemas/PaginatedAccountList'
                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: Chưa được xác thực - 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: Chưa được xác thực
                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:
    Hash:
      type: string
      description: Hàm băm 32 byte được biểu diễn dưới dạng chuỗi base58.
      example: 11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP
    DataSlice:
      type: object
      required:
        - offset
        - length
      properties:
        length:
          type: integer
          minimum: 0
        offset:
          type: integer
          minimum: 0
    FilterSelector:
      type: object
      properties:
        memcmp:
          $ref: '#/components/schemas/Memcmp'
    Limit:
      type: integer
      format: int64
      minimum: 0
    SerializablePubkey:
      type: string
      description: Khóa công khai Solana được biểu diễn dưới dạng chuỗi base58.
      default: 11111114d3RrygbPdAtMuFnDmzsN8T5fYKVQ7FVr7
      example: 11111114d3RrygbPdAtMuFnDmzsN8T5fYKVQ7FVr7
    Context:
      type: object
      required:
        - slot
      properties:
        slot:
          type: integer
          default: 100
          example: 100
    PaginatedAccountList:
      type: object
      required:
        - items
      properties:
        cursor:
          $ref: '#/components/schemas/Hash'
        items:
          type: array
          items:
            $ref: '#/components/schemas/Account'
      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'
    Memcmp:
      type: object
      required:
        - offset
        - bytes
      properties:
        bytes:
          $ref: '#/components/schemas/Base58String'
        offset:
          type: integer
          minimum: 0
    Account:
      type: object
      required:
        - hash
        - owner
        - lamports
        - tree
        - leafIndex
        - seq
        - slotCreated
      properties:
        address:
          $ref: '#/components/schemas/SerializablePubkey'
        data:
          $ref: '#/components/schemas/AccountData'
        hash:
          $ref: '#/components/schemas/Hash'
        lamports:
          $ref: '#/components/schemas/UnsignedInteger'
        leafIndex:
          $ref: '#/components/schemas/UnsignedInteger'
        owner:
          $ref: '#/components/schemas/SerializablePubkey'
        seq:
          $ref: '#/components/schemas/UnsignedInteger'
        slotCreated:
          $ref: '#/components/schemas/UnsignedInteger'
        tree:
          $ref: '#/components/schemas/SerializablePubkey'
      additionalProperties: false
    Base58String:
      type: string
      description: Chuỗi được mã hóa base58.
      default: 3J98t1WpEZ73CNm
      example: 3J98t1WpEZ73CNm
    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
    Base64String:
      type: string
      description: Chuỗi được mã hóa base64.
      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).

````