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

# Discover main Defindex vaults

> Queries the factory contract for main Defindex vaults and returns their addresses with total managed funds. Results are cached for 5 minutes.



## OpenAPI

````yaml GET /vault/discover
openapi: 3.0.0
info:
  title: DeFindex API
  description: API documentation for DeFindex endpoints
  version: 1.0.0
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/defindex-full.svg
    backgroundColor: '#0e0e0e'
    altText: DeFindex Logo
    href: https://defindex.io
servers: []
security: []
tags: []
paths:
  /vault/discover:
    get:
      tags:
        - Vault
      summary: Discover main Defindex vaults
      description: >-
        Queries the factory contract for main Defindex vaults and returns their
        addresses with total managed funds. Results are cached for 5 minutes.
      operationId: VaultController_discoverVaults
      parameters:
        - name: network
          required: true
          in: query
          description: Stellar network to query (testnet or mainnet)
          schema:
            enum:
              - testnet
              - mainnet
            type: string
      responses:
        '200':
          description: List of main Defindex vaults with managed funds
          content:
            application/json:
              schema:
                type: object
                properties:
                  totalVaults:
                    type: number
                    description: Total number of vaults fetched in request
                    example: 12
                  vaults:
                    type: array
                    items:
                      type: object
                      properties:
                        address:
                          type: string
                          description: Vault contract address
                        apy:
                          type: number
                          nullable: true
                          description: >-
                            30-day annualized percentage yield (APY) following
                            DeFiLlama standard, or null if calculation failed
                        totalManagedFunds:
                          type: array
                          nullable: true
                          description: >-
                            Total managed funds per asset, or null if the
                            simulation for this vault failed
                          items:
                            type: object
                            properties:
                              asset:
                                type: string
                                description: Asset contract address
                              total_amount:
                                type: string
                                description: >-
                                  Total managed amount for this asset (string to
                                  handle large numbers)
        '400':
          description: >-
            Invalid or missing `network` query parameter. Must be "testnet" or
            "mainnet".
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: number
                    example: 400
                  message:
                    type: string
                    example: 'Unsupported network: invalid_value'
                  error:
                    type: string
                    example: Bad Request
        '429':
          description: >-
            Rate limit exceeded. Too many requests for your current tier. Retry
            after the indicated time.
        '500':
          description: >-
            Internal server error. Possible cause: multiple contract call
            failures or unexpected infrastructure issues.

````

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