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

# Get collateral reserves with borrowable reserves

> Derive one Borrow market row per collateral reserve and debt category from each configured Kamino Lend market.



## OpenAPI

````yaml /kamino-api.json get /markets/collateral-reserves
openapi: 3.1.0
info:
  version: 1.0.0
  title: Kamino Public API
  description: >
    The Kamino API provides a comprehensive way to interact with Kamino without
    reading directly from the blockchain.


    The API also provides the ability to fetch data that might not be available
    from just reading the chain.


    The API is rate-limited for unauthenticated users. If you feel you need to
    make more requests or run into rate-limit issues, please reach out.
servers:
  - url: https://api.kamino.finance
security: []
paths:
  /markets/collateral-reserves:
    get:
      tags:
        - Kamino Lend Markets
      summary: Get collateral reserves with borrowable reserves
      description: >-
        Derive one Borrow market row per collateral reserve and debt category
        from each configured Kamino Lend market.
      parameters:
        - schema:
            type: string
            description: Collateral reserve slug or alias
            example: jitosol-sol
          required: false
          description: Collateral reserve slug or alias
          name: slug
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: Lending market public key
                example: 7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF
          required: false
          description: Lending market public key
          name: market
          in: query
        - schema:
            allOf:
              - $ref: '#/components/schemas/AddressBase58'
              - description: Collateral reserve public key
                example: FBSyPnxtHKLBZ4UeeUyAnbtFuAmTHLtso9YtsqRDRWpM
          required: false
          description: Collateral reserve public key
          name: collateralReserve
          in: query
        - schema:
            type: string
            description: >-
              Partner preview alias, case-insensitive. Also returns the Hidden
              reserves configured for it in resources previewAliases. Unknown or
              expired aliases return the default response.
            example: partner-preview
          required: false
          description: >-
            Partner preview alias, case-insensitive. Also returns the Hidden
            reserves configured for it in resources previewAliases. Unknown or
            expired aliases return the default response.
          name: preview
          in: query
        - schema:
            type: string
            default: KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
            description: KLend program ID
            example: KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
          required: false
          description: KLend program ID
          name: programId
          in: query
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketsCollateralReservesResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: High-level error message describing the failure
                    example: Invalid query params
                  details:
                    type: array
                    items:
                      type: object
                      additionalProperties: {}
                    description: >-
                      Detailed validation issues (present only for validation
                      errors)
                required:
                  - error
                description: Bad request response (400)
                example:
                  error: Invalid query request
                  details:
                    - code: invalid_union
                      errors:
                        - - code: custom
                            path: []
                            message: Invalid date string
                        - - expected: number
                            code: invalid_type
                            path: []
                            message: 'Invalid input: expected number, received string'
                      path:
                        - start
                      message: Invalid input
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddressBase58:
      type: string
      description: Valid base58-encoded address
      example: VEG1EMtttdHunMbSza8uoms1R18VXmYSph2bBpHcSJd
    MarketsCollateralReservesResponse:
      type: object
      properties:
        collateralReserves:
          type: array
          items:
            $ref: '#/components/schemas/CollateralReserve'
      required:
        - collateralReserves
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message for internal server failure
          example: An internal error occurred
      required:
        - error
      description: Internal server error response (500)
      example:
        error: An internal error occurred
    CollateralReserve:
      type: object
      properties:
        lendingMarket:
          $ref: '#/components/schemas/AddressBase58'
        lendingMarketName:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        collateralReserve:
          $ref: '#/components/schemas/AddressBase58'
        collateralMint:
          $ref: '#/components/schemas/AddressBase58'
        borrowReserves:
          type: array
          items:
            $ref: '#/components/schemas/AddressBase58'
        borrowReserveTerms:
          type: array
          items:
            $ref: '#/components/schemas/BorrowReserveTerms'
          description: >-
            Elevation group terms per entry of borrowReserves, same order. Caps
            live on /reserves/batch/stats borrowCaps.debtAgainstCollateral.
            Absent on rows cached before the field existed.
        debtCategory:
          type: string
          description: Readable debt asset category label
          example: Stablecoin assets
        debtTag:
          type: string
          description: Stable debt grouping, tab, and URL key
          example: stables
        collateralCategory:
          type:
            - string
            - 'null'
          description: Readable collateral asset category label, or null when uncategorized
          example: Crypto assets
        collateralTag:
          type:
            - string
            - 'null'
          description: Stable collateral tab key, or null when uncategorized
          example: crypto
        collateralBackingDebtUsd:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
          description: >-
            USD value of this collateral attributed pro rata to the debt
            represented by borrowReserves, or null when portfolio market data is
            unavailable
        debtAgainstCollateralUsd:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
          description: >-
            USD value of the debt represented by borrowReserves attributed pro
            rata against this collateral, or null when portfolio market data is
            unavailable
        sizeUsd:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
          description: >-
            Sum of collateralBackingDebtUsd and debtAgainstCollateralUsd, or
            null when either value is unavailable
        slugs:
          type: array
          items:
            type: string
        hidden:
          type: boolean
          description: Whether the lending market is listed in resources hiddenMarkets
          example: false
      required:
        - lendingMarket
        - lendingMarketName
        - name
        - description
        - collateralReserve
        - collateralMint
        - borrowReserves
        - debtCategory
        - debtTag
        - collateralCategory
        - collateralTag
        - collateralBackingDebtUsd
        - debtAgainstCollateralUsd
        - sizeUsd
        - slugs
        - hidden
    BorrowReserveTerms:
      type: object
      properties:
        reserve:
          allOf:
            - $ref: '#/components/schemas/AddressBase58'
            - description: >-
                Debt reserve these terms apply to, matching an entry of
                borrowReserves
              example: d4A2prbA2whesmvHaL88BH6Ewn5N4bTSU2Ze8P6Bc4Q
        elevationGroup:
          type: integer
          description: >-
            Elevation group a borrow of this debt against this collateral would
            auto-select, being the usable common group with the highest ltvPct.
            0 when the pair has no usable group, in which case the terms below
            are the reserves own configuration.
          example: 2
        maxLtv:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: >-
                Maximum loan to value ratio for this collateral under
                elevationGroup
              example: '0.87'
        liquidationLtv:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: >-
                Liquidation loan to value ratio for this collateral under
                elevationGroup
              example: '0.92'
        borrowFactor:
          allOf:
            - $ref: '#/components/schemas/Decimal'
            - description: Borrow factor applied to this debt reserve under elevationGroup
              example: '1'
      required:
        - reserve
        - elevationGroup
        - maxLtv
        - liquidationLtv
        - borrowFactor
    Decimal:
      type: string
      description: Decimal value represented as string
      example: '1234.56789'

````

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