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

> Returns one Earn vault and its latest snapshot by on-chain vault address. `parsedAccountJson` holds the decoded provider account, including token entries, strategy positions and withdrawal configuration.



## OpenAPI

````yaml get /markets/earn/vaults/{address}
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/earn/vaults/{address}:
    get:
      tags:
        - earn_data
      summary: Get Earn Vault
      description: >-
        Returns one Earn vault and its latest snapshot by on-chain vault
        address. `parsedAccountJson` holds the decoded provider account,
        including token entries, strategy positions and withdrawal
        configuration.
      operationId: query_get_earn_vault
      parameters:
        - name: address
          in: path
          description: Earn vault address
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Earn vault with its latest snapshot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EarnVaultWithLatestSnapshot'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    EarnVaultWithLatestSnapshot:
      allOf:
        - $ref: '#/components/schemas/EarnVault'
          description: Earn vault account (DB projection of the on-chain/provider state).
        - type: object
          properties:
            acceptedAssetMints:
              type: array
              items:
                type: string
              description: >-
                Tokens offered for deposits and payouts: `accepted_asset_mint`
                first, then any

                of the vault's other held tokens it has opted in. Most vaults
                list only the

                accepted asset.
            latestSnapshot:
              oneOf:
                - type: 'null'
                - $ref: '#/components/schemas/EarnVaultSnapshotResponse'
    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
    EarnVault:
      type: object
      description: Earn managed vault metadata plus cached parsed provider state.
      required:
        - address
        - providerKind
        - shareMint
        - acceptedAssetMint
        - managerAuthority
        - metadataJson
        - status
        - queueEnabled
        - instantEnabled
        - cancelEnabled
        - requiresAcknowledgment
        - parsedAccountJson
        - createdAt
      properties:
        acceptedAssetMint:
          type: string
          description: accepted deposit asset mint
        address:
          type: string
          description: on-chain vault address
        cancelEnabled:
          type: boolean
          description: user cancellation supported
        createdAt:
          type: string
          description: row creation timestamp
        instantEnabled:
          type: boolean
          description: instant withdrawals supported
        lastUpdatedSlot:
          type:
            - string
            - 'null'
          description: latest applied slot
        lastUpdatedTs:
          type:
            - string
            - 'null'
          description: latest applied timestamp
        managerAuthority:
          type: string
          description: curator or manager authority
        metadataJson:
          type: object
          description: off-chain display/product metadata
          additionalProperties: {}
          propertyNames:
            type: string
        parsedAccountJson:
          type: object
          description: cached ParsedEarnVault JSON
          additionalProperties: {}
          propertyNames:
            type: string
        providerKind:
          type: integer
          format: int32
          description: provider enum discriminant
          minimum: 0
        queueEnabled:
          type: boolean
          description: queued withdrawals supported
        requiresAcknowledgment:
          type: boolean
          description: deposit flow acknowledgment required
        shareMint:
          type: string
          description: provider share mint
        status:
          type: integer
          format: int32
          description: vault status enum discriminant
          minimum: 0
    EarnVaultSnapshotResponse:
      type: object
      required:
        - snapshotSlot
        - snapshotTs
        - shareSupply
        - navPerShareE18
        - totalAumAssets
        - pendingWithdrawalsAssets
      properties:
        displayApyBps:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Forward-looking base vault APY: share-of-AUM-weighted sum of the

            per-position `display_apy_bps` rows this vault holds. Signed, in
            basis

            points. `null` when Display APY coverage is insufficient.
        headlineApyBps:
          type:
            - integer
            - 'null'
          format: int32
          description: |-
            The APY to show for the vault: `display_apy_bps` plus
            `rewards_apy_bps`, falling back to `realized_return_bps_7d` as the
            base when there is no Display APY. `null` when neither leg is known.
        leverageX100:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        navPerShareE18:
          type: string
        pendingWithdrawalsAssets:
          type: string
        realizedApyBps24h:
          type:
            - integer
            - 'null'
          format: int32
          description: DEPRECATED — use `realizedReturnBps24h`.
        realizedApyBps30d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            DEPRECATED — use `realizedReturnBps30d`. Mirrored for one release
            cycle

            to give SDK / FE consumers time to migrate; will be removed in a

            follow-up PR.
        realizedApyBps7d:
          type:
            - integer
            - 'null'
          format: int32
          description: DEPRECATED — use `realizedReturnBps7d`.
        realizedReturnBps24h:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 24h, in basis
            points.
        realizedReturnBps30d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 30d, in basis
            points.

            Distinct from `display_apy_bps` (forward-looking, from underlyings).
        realizedReturnBps7d:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Backward-looking NAV-delta return over the trailing 7d, in basis
            points.
        rewardsApyBps:
          type:
            - integer
            - 'null'
          format: int32
          description: |-
            Forward-looking rewards APY, in basis points: the rate every active
            emission campaign (Exponent scheduled emissions and Loopscale reward
            campaigns) declares at the snapshot, priced and annualized over AUM.
            Not part of `display_apy_bps`; `headline_apy_bps` adds the two.
        shareSupply:
          type: string
        snapshotSlot:
          type: string
        snapshotTs:
          type: string
        totalAumAssets:
          type: string
        utilizationBps:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
    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.