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

> Returns a list of strategy data matching the filters.

A Strategy is the onchain capital escrow and lending ruleset that sits behind every Vault. It holds deposited capital, deploys it as advanced lending orders on the credit order book according to curator-defined parameters (eligible collateral, rates, durations), and tracks accrued interest and external yield. Use this endpoint to query strategy-level data directly — for example, when computing Vault TVL or APY from raw fields rather than pre-aggregated Vault metadata.


## OpenAPI

````yaml post /markets/strategy/infos
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/strategy/infos:
    post:
      tags:
        - strategy_data
      summary: Get Loopscale Strategies
      description: Returns a list of strategy data matching the filters.
      operationId: route_get_strategy_info
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LendingStrategyFilter'
        required: true
      responses:
        '200':
          description: List of strategies that match filter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiStrategyInfoResponse'
        '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:
    LendingStrategyFilter:
      type: object
      description: lending strategy filter
      properties:
        addresses:
          type: array
          items:
            type: string
        collateralTermsAssetFilter:
          type: array
          items:
            type: string
          description: >-
            When non-empty on the summary endpoint, run a secondary query to
            fetch

            `terms.asset_terms` only for these collateral mints. Empty (default)
            =

            `terms.asset_terms` stays empty, no secondary query is run. Ignored
            by

            the full `/strategy/infos` endpoint.
        overridePageSize:
          type: boolean
        page:
          type: integer
          format: int64
          minimum: 0
        pageSize:
          type: integer
          format: int64
          minimum: 0
        principalMints:
          type: array
          items:
            type: string
        showArchived:
          type: boolean
        sortDirection:
          type: integer
          format: int32
          minimum: 0
        sortType:
          type: integer
          format: int32
          minimum: 0
        userAddress:
          type:
            - string
            - 'null'
    ApiStrategyInfoResponse:
      type: object
      required:
        - items
        - pageInfo
        - aggregate
        - snapshotTs
      properties:
        aggregate:
          $ref: '#/components/schemas/StrategiesAggregate'
        items:
          type: array
          items:
            $ref: '#/components/schemas/StrategyDetail'
        pageInfo:
          $ref: '#/components/schemas/PageInfo'
        snapshotTs:
          type: integer
          format: int64
    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
    StrategiesAggregate:
      type: object
      description: >-
        Filter-scoped aggregate over the full matched strategy set. USD fields
        use

        the request's pinned oracle snapshot. APYs are fractional (0.085 =
        8.5%).


        `wAvgApy` and `expected24hInterestUsd` are **blended**: they include
        both

        deployed-side interest (from `ledgers.apy`) and external-yield-side
        yield

        (from `external_yield_vaults.apy`). Idle principal sitting in the
        strategy's

        token account contributes to `strategyBalanceUsd` and drags the weighted

        average with an implicit 0% APY, matching realized-yield semantics.


        Strategies are lender-side only — no role ambiguity;
        `expected24hInterestUsd`

        always represents accrual to the lender.
      required:
        - count
        - principalDeployedUsd
        - strategyBalanceUsd
        - totalSupplyUsd
        - interestAccruedUsd
        - interestEarnedAllTimeUsd
        - wAvgApy
        - expected24hInterestUsd
      properties:
        count:
          type: integer
          format: int64
          description: Number of strategies folded into this aggregate.
          minimum: 0
        expected24hInterestUsd:
          type: number
          format: double
          description: >-
            Projected 24h interest in USD — computed off the unrounded weighted

            APY numerator, so it reconciles with the displayed `wAvgApy` within
            a

            fraction of a bp. Lender-side accrual.
        interestAccruedUsd:
          type: number
          format: double
          description: Currently-outstanding deployed interest accrued by ledgers, in USD.
        interestEarnedAllTimeUsd:
          type: number
          format: double
          description: >-
            Lifetime interest earned by the lender, read directly from on-chain

            `strategy.cumulative_interest_accrued` summed across the group and

            priced at the snapshot. Independent of `interestAccruedUsd` (which
            is

            only the *currently outstanding* leg).
        principalDeployedUsd:
          type: number
          format: double
          description: >-
            Deployed-side principal in USD — `SUM(principal_due −
            principal_repaid)`

            across active ledgers, priced at the snapshot.
        strategyBalanceUsd:
          type: number
          format: double
          description: |-
            Idle-side principal in USD — strategy token-account balance plus
            external-yield-vault balance, priced at the snapshot.
        totalSupplyUsd:
          type: number
          format: double
          description: '`principalDeployedUsd + strategyBalanceUsd` — total lender supply.'
        wAvgApy:
          type: number
          format: double
          description: |-
            Blended USD-weighted APY: deployed-side (from `ledgers.apy`) plus
            external-yield-side (from `external_yield_vaults.apy`). Idle in the
            token account contributes at an implicit 0%. Weighting key is
            `totalSupplyUsd`.
    StrategyDetail:
      allOf:
        - $ref: '#/components/schemas/StrategyInfo'
        - type: object
          required:
            - principalDeployedUsd
            - strategyBalanceUsd
            - totalSupplyUsd
            - interestAccruedUsd
            - interestEarnedAllTimeUsd
            - wAvgApy
            - expected24hInterestUsd
          properties:
            expected24hInterestUsd:
              type: number
              format: double
            interestAccruedUsd:
              type: number
              format: double
            interestEarnedAllTimeUsd:
              type: number
              format: double
            principalDeployedUsd:
              type: number
              format: double
            strategyBalanceUsd:
              type: number
              format: double
            totalSupplyUsd:
              type: number
              format: double
            wAvgApy:
              type: number
              format: double
    PageInfo:
      type: object
      description: >-
        Pagination envelope shared across paginated listing endpoints

        (`/loans/info`, `/strategy/infos`, `/loop/info/v2`,
        `/lending_vaults/user/v2`).

        `totalItems` / `totalPages` are filter-scoped, not page-scoped.
      required:
        - page
        - pageSize
        - totalItems
        - totalPages
      properties:
        page:
          type: integer
          format: int64
          description: 0-indexed page number echoed back from the request.
          minimum: 0
        pageSize:
          type: integer
          format: int64
          description: |-
            Maximum item count per page applied by the server (may differ from
            the request's `pageSize` if the request was 0 or above the cap).
          minimum: 0
        totalItems:
          type: integer
          format: int64
          description: |-
            Total item count across the *filter* scope (not just this page).
            What "item" counts as depends on the endpoint — for grouped
            endpoints this is the count of distinct groups, not loans/rows.
          minimum: 0
        totalPages:
          type: integer
          format: int64
          description: '`ceil(totalItems / pageSize)`.'
          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.
    StrategyInfo:
      type: object
      required:
        - strategy
        - terms
        - borrowCapMonitor
        - supplyCapMonitor
        - withdrawCapMonitor
      properties:
        borrowCapMonitor:
          $ref: '#/components/schemas/ParsedCapMonitor'
        externalYieldInfo:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/ExternalYieldInfo'
        strategy:
          $ref: '#/components/schemas/Strategy'
          description: Strategy account state (DB projection of the on-chain strategy).
        supplyCapMonitor:
          $ref: '#/components/schemas/ParsedCapMonitor'
        terms:
          $ref: '#/components/schemas/StrategyTerms'
        withdrawCapMonitor:
          $ref: '#/components/schemas/ParsedCapMonitor'
    ParsedCapMonitor:
      type: object
      required:
        - startTime1hr
        - startTime24hr
        - principal1hr
        - principal24hr
      properties:
        principal1hr:
          type: string
        principal24hr:
          type: string
        startTime1hr:
          type: string
        startTime24hr:
          type: string
    ExternalYieldInfo:
      type: object
      required:
        - externalYieldSource
        - balance
        - apy
        - yieldAccount
        - lastUpdateTime
      properties:
        apy:
          type: string
        balance:
          type: string
        externalYieldSource:
          type: integer
          format: int32
          minimum: 0
        lastUpdateTime:
          type: integer
          format: int64
        yieldAccount:
          type: string
    Strategy:
      type: object
      required:
        - address
        - version
        - nonce
        - bump
        - principalMint
        - tokenBalance
        - lender
        - originationsEnabled
        - externalYieldSource
        - interestPerSecond
        - lastAccruedTimestamp
        - liquidityBuffer
        - interestFee
        - principalFee
        - originationFee
        - originationCap
        - externalYieldAmount
        - currentDeployedAmount
        - outstandingInterestAmount
        - feeClaimable
        - cumulativePrincipalOriginated
        - cumulativeInterestAccrued
        - cumulativeLoanCount
        - activeLoanCount
        - marketInformation
        - closed
        - lastInteractedTime
        - lastInteractedTxn
        - createdAt
        - writeVersion
        - supplyCap1hrPeriodStart
        - supplyCap24hrPeriodStart
        - supplyCap1hrAmount
        - supplyCap24hrAmount
        - borrowCap1hrPeriodStart
        - borrowCap24hrPeriodStart
        - borrowCap1hrAmount
        - borrowCap24hrAmount
        - withdrawCap1hrPeriodStart
        - withdrawCap24hrPeriodStart
        - withdrawCap1hrAmount
        - withdrawCap24hrAmount
      properties:
        activeLoanCount:
          type: string
        address:
          type: string
        borrowCap1hrAmount:
          type: string
        borrowCap1hrPeriodStart:
          type: string
        borrowCap24hrAmount:
          type: string
        borrowCap24hrPeriodStart:
          type: string
        bump:
          type: integer
          format: int32
          minimum: 0
        closed:
          type: boolean
        createdAt:
          type: string
        cumulativeInterestAccrued:
          type: string
        cumulativeLoanCount:
          type: string
        cumulativePrincipalOriginated:
          type: string
        currentDeployedAmount:
          type: string
        externalYieldAmount:
          type: string
        externalYieldSource:
          type: integer
          format: int32
          minimum: 0
        feeClaimable:
          type: string
        id:
          type: integer
          format: int32
          minimum: 0
        interestFee:
          type: string
        interestPerSecond:
          type: number
          format: double
        lastAccruedTimestamp:
          type: string
        lastInteractedTime:
          type: string
        lastInteractedTxn:
          type: string
        lender:
          type: string
        liquidityBuffer:
          type: string
        marketInformation:
          type: string
        nonce:
          type: string
        originationCap:
          type: string
        originationFee:
          type: string
        originationsEnabled:
          type: boolean
        outstandingInterestAmount:
          type: string
        principalFee:
          type: string
        principalMint:
          type: string
        supplyCap1hrAmount:
          type: string
        supplyCap1hrPeriodStart:
          type: string
        supplyCap24hrAmount:
          type: string
        supplyCap24hrPeriodStart:
          type: string
        tokenBalance:
          type: string
        version:
          type: integer
          format: int32
          minimum: 0
        withdrawCap1hrAmount:
          type: string
        withdrawCap1hrPeriodStart:
          type: string
        withdrawCap24hrAmount:
          type: string
        withdrawCap24hrPeriodStart:
          type: string
        writeVersion:
          type: string
    StrategyTerms:
      type: object
      required:
        - assetTerms
        - supplyCaps
        - borrowCaps
        - withdrawCaps
      properties:
        assetTerms:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AssetTerms'
          propertyNames:
            type: string
        borrowCaps:
          $ref: '#/components/schemas/ParsedPrincipalCaps'
          description: Principal borrow caps (rolling 1h/24h + max outstanding).
        supplyCaps:
          $ref: '#/components/schemas/ParsedPrincipalCaps'
          description: Principal supply caps (rolling 1h/24h + max outstanding).
        withdrawCaps:
          $ref: '#/components/schemas/ParsedPrincipalCaps'
          description: Principal withdraw caps (rolling 1h/24h + max outstanding).
    AssetTerms:
      type: object
      required:
        - durationAndApys
        - allocationInfo
      properties:
        allocationInfo:
          $ref: '#/components/schemas/ParsedCollateralCaps'
        durationAndApys:
          type: array
          items: {}
          description: >-
            Positional `[duration, apy]` pairs — a heterogeneous 2-tuple array,
            so it's

            typed as an array of JSON values rather than a named element type.
    ParsedPrincipalCaps:
      type: object
      description: >-
        Parsed principal supply/borrow/withdraw caps: rolling 1h and 24h
        ceilings plus

        the max concurrent outstanding, all in the principal mint's native
        units.
      required:
        - max1hr
        - max24hr
        - maxOutstanding
      properties:
        max1hr:
          type: string
        max24hr:
          type: string
        maxOutstanding:
          type: string
    ParsedCollateralCaps:
      type: object
      required:
        - maxAllocationPct
        - currentAllocationAmount
      properties:
        currentAllocationAmount:
          type: string
        maxAllocationPct:
          type: string

````