> ## 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.0
info:
  title: Loopscale API
  version: 0.1.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/quote:
    post:
      tags:
        - quotes
      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: route_get_quote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RawQuoteFilter'
        required: true
      responses:
        '200':
          description: List of available quotes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RawQuoteOffer'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RawQuoteFilter:
      type: object
      required:
        - collateral
        - principal
        - limit
        - duration
        - durationType
        - offset
      properties:
        apyRange:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int64
            minimum: 0
          description: Inclusive `[min, max]` APY bounds (basis points).
        collateral:
          type: array
          items:
            type: string
        duration:
          type: integer
          format: int32
          minimum: 0
        durationType:
          type: integer
          format: int32
          minimum: 0
        excludedExternalYield:
          type:
            - array
            - 'null'
          items:
            type: integer
            format: int32
            minimum: 0
        lendingStrategyAddress:
          type:
            - string
            - 'null'
        limit:
          type: integer
          format: int64
          minimum: 0
        minPrincipalAmount:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        offset:
          type: integer
          format: int64
          minimum: 0
        principal:
          type: string
    RawQuoteOffer:
      type: object
      required:
        - apy
        - ltv
        - liquidationThreshold
        - maxPrincipalAvailable
        - sumPrincipalAvailable
      properties:
        apy:
          type: integer
          format: int64
          minimum: 0
        liquidationThreshold:
          type: integer
          format: int32
          minimum: 0
        ltv:
          type: integer
          format: int32
          minimum: 0
        maxPrincipalAvailable:
          type: integer
          format: int64
          minimum: 0
        sumPrincipalAvailable:
          type: integer
          format: int64
          minimum: 0
    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
    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.

````