> ## Documentation Index
> Fetch the complete documentation index at: https://loopscale.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Vault depositors

> Fetches a list of users and total balances grouped by Vault.



## OpenAPI

````yaml post /markets/lending_vaults/deposits
openapi: 3.1.0
info:
  title: Loopscale API
  version: 0.1.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/lending_vaults/deposits:
    post:
      tags:
        - lending_vaults_data
      summary: Get list of Vault depositors
      description: Fetches a list of users and total balances grouped by Vault.
      operationId: query_get_vault_positions
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserLendingVaultFilter'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/VaultDeposits'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UserLendingVaultFilter:
      type: object
      properties:
        lpMints:
          type: array
          items:
            type: string
        page:
          type: integer
          format: int64
          minimum: 0
        pageSize:
          type: integer
          format: int64
          minimum: 0
        principalMints:
          type: array
          items:
            type: string
        sort:
          type: integer
          format: int32
          description: Sort key (see `StakeSortType` discriminants).
          minimum: 0
        sortDirection:
          type: integer
          format: int32
          description: 'Sort direction: `0` = ascending, `1` = descending.'
          minimum: 0
        stakeDuration:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        status:
          type: integer
          format: int32
          description: Position status filter (see `StakeStatus` discriminants).
          minimum: 0
        userAddress:
          type:
            - string
            - 'null'
          description: >-
            Depositor wallet. Required by `/lending_vaults/user/v2`
            (filter-only,

            no header fallback). Optional on legacy paths that read from the
            auth header.
        vaultAddresses:
          type: array
          items:
            type: string
    VaultDeposits:
      type: object
      required:
        - vaultAddress
        - userDeposits
      properties:
        userDeposits:
          type: array
          items:
            $ref: '#/components/schemas/ParsedVaultPosition'
        vaultAddress:
          type: string
    ErrorResponse:
      type: object
      description: |-
        Canonical error envelope for every endpoint. The `x-request-id` response
        header carries the correlation id for the failing request.
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetails'
          description: error detail
    ParsedVaultPosition:
      type: object
      required:
        - userAddress
        - amountSupplied
      properties:
        amountSupplied:
          type: integer
          format: int64
          minimum: 0
        userAddress:
          type: string
    ErrorDetails:
      type: object
      description: Inner detail of the [`ErrorResponse`] envelope.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code, mirrored in the response status line
          example: 400
          minimum: 0
        message:
          type: string
          description: human-readable, client-safe message (sensitive data redacted)
          example: Request could not be processed.
        simulation:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SimulationDebug'
              description: >-
                Populated on transaction-generation endpoints when the
                build-path

                simulation reverts. Absent on all other error paths.
    SimulationDebug:
      type: object
      description: >-
        Diagnostics attached to a build-path simulation revert so clients can
        inspect

        the exact txn that would have failed on-chain. Only populated for
        txn-gen

        endpoints; other 4xx/5xx responses omit this field.
      required:
        - decoded
        - logs
      properties:
        decoded:
          type: string
          description: >-
            Human-readable decoded error (Anchor "Error Message: ..." when
            available,

            otherwise the raw program error code or `TransactionError` debug
            form).
        logs:
          type: array
          items:
            type: string
          description: Program logs from the reverting simulation, in order.
        serializedTransaction:
          type:
            - string
            - 'null'
          description: >-
            Base64-encoded, bincode-serialized `VersionedTransaction` that was

            simulated (signatures zeroed for sig-verify-disabled simulation).

            Decode with
            `bincode::deserialize::<VersionedTransaction>(&base64_decode(..))`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.