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

> Retorna todas as contas comprimidas de ZK Compression de propriedade de um determinado endereço Solana — com paginação via cursor, fatias de dados e predicados de filtro para consultas eficientes.

## Parâmetros da Requisição

<ParamField body="cursor" type="string">
  Um hash de 32 bytes representado como uma string 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">
  Uma chave pública de Solana representada como uma string base58.
</ParamField>


## OpenAPI

````yaml pt-BR/openapi/zk-compression/getCompressedAccountsByOwner.yaml POST /
openapi: 3.0.3
info:
  title: photon-indexer
  description: Indexador Solana para compressão geral
  license:
    name: Apache-2.0
  version: 0.50.0
servers:
  - url: https://mainnet.helius-rpc.com
    description: Endpoint RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Endpoint RPC Devnet
security: []
paths:
  /:
    summary: getCompressedAccountsByOwner
    post:
      description: Recupera informações de getCompressedAccountsByOwner
      operationId: getCompressedAccountsByOwner
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  description: A versão do protocolo JSON-RPC.
                  enum:
                    - '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: Um ID para identificar a solicitação.
                  default: '1'
                method:
                  type: string
                  description: O nome do método a ser invocado.
                  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: >-
            Contas comprimidas recuperadas com sucesso pelo proprietário a
            partir da 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: >-
            Bad Request - Parâmetros de solicitação inválidos ou solicitação
            malformada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Parâmetros inválidos
                id: '1'
        '401':
          description: Não autorizado - Chave de API inválida ou ausente.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Não autorizado
                id: '1'
        '429':
          description: Muitas solicitações - Limite de taxa excedido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Muitas solicitações
                id: '1'
        '500':
          description: Erro Interno do Servidor - Ocorreu um erro no servidor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Erro interno
                id: '1'
        '503':
          description: Serviço Indisponível - O serviço está temporariamente indisponível.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Serviço indisponível
                id: '1'
        '504':
          description: >-
            Tempo Limite do Gateway - O tempo limite da solicitação foi
            atingido.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Tempo limite do gateway
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    Hash:
      type: string
      description: Um hash de 32 bytes representado como uma string 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: Uma chave pública Solana representada como uma string 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: A versão do protocolo JSON-RPC.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: O código de erro.
              example: -32602
            message:
              type: string
              description: A mensagem de erro.
            data:
              type: object
              description: Informações adicionais sobre o erro.
        id:
          type: string
          description: Identificador correspondente à solicitação.
          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: Uma string codificada em base 58.
      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: Uma string codificada em base 64.
      default: SGVsbG8sIFdvcmxkIQ==
      example: SGVsbG8sIFdvcmxkIQ==
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Sua chave de API Helius. Você pode obter uma gratuitamente no
        [dashboard](https://dashboard.helius.dev/api-keys).

````