> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loopscale.com/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.

````