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

> Returns a list of current lend orders available for the specified principal token, collateral, and target duration. Results are sorted by APY and support pagination.



## OpenAPI

````yaml post /markets/quote
openapi: 3.1.3
info:
  title: Loopscale API
  version: 1.0.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/quote:
    post:
      tags:
        - Markets
      summary: Get quotes
      description: >-
        Returns a list of current lend orders available for the specified
        principal token, collateral, and target duration. Results are sorted by
        APY and support pagination.
      operationId: getQuotes
      parameters:
        - name: user-wallet
          in: header
          required: true
          schema:
            type: string
          description: Wallet address of the requesting user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetQuotesRequest'
      responses:
        '200':
          description: List of available quotes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GetQuotesResponseItem'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/GeneralError'
components:
  schemas:
    GetQuotesRequest:
      type: object
      required:
        - durationType
        - duration
        - principal
        - limit
        - offset
        - collateral
      properties:
        durationType:
          type: number
          description: >-
            Duration type enum (0 = days, 1 = weeks, 2 = months, 3 = minutes, 4
            = years)
        duration:
          type: number
          description: Number of units of the specified durationType
        principal:
          type: string
          description: Token mint address of the principal
        limit:
          type: integer
          description: Pagination limit (max 1000)
        offset:
          type: integer
          description: Pagination offset, sorted by APY
        collateral:
          type: array
          items:
            type: string
          description: List of collateral asset identifiers
        minPrincipalAmount:
          type: integer
          description: Optional minimum principal amount in lamports to filter offers
    GetQuotesResponseItem:
      type: object
      properties:
        apy:
          type: number
          description: APY in cBPS (e.g., 10% = 100000)
        ltv:
          type: number
          description: Loan-to-value ratio in cBPS
        liquidationThreshold:
          type: number
          description: Liquidation threshold in cBPS
        maxPrincipalAvailable:
          type: number
          description: Maximum principal available in lamports
        sumPrincipalAvailable:
          type: number
          description: Total principal available in lamports for the given quote parameters
  responses:
    BadRequest:
      description: Bad Request
      content:
        text/plain:
          schema:
            type: string
            example: 'Something went wrong: You have an error in your SQL syntax.'
    GeneralError:
      description: General Server Error
      content:
        text/plain:
          schema:
            type: string
            example: >-
              Failed to deserialize the JSON body into the target type: missing
              field `mints` at line 1 column 1.

````