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

# List Morpho markets

> List curated Morpho Blue lending markets for a chain.

Morpho Blue is permissionless, so credit actions identify a market by its
bytes32 market id. This returns the curated market set with live LLTV,
supply/borrow APY, utilization, and available liquidity -- read on-chain per
request -- so callers know which market_id to use and what it currently costs.



## OpenAPI

````yaml /v2/combined_spec.json get /v2/credit/morpho_markets
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/credit/morpho_markets:
    get:
      tags:
        - Credit
      summary: List Morpho markets
      description: >-
        List curated Morpho Blue lending markets for a chain.


        Morpho Blue is permissionless, so credit actions identify a market by
        its

        bytes32 market id. This returns the curated market set with live LLTV,

        supply/borrow APY, utilization, and available liquidity -- read on-chain
        per

        request -- so callers know which market_id to use and what it currently
        costs.
      operationId: v2_credit_morpho_markets
      parameters:
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Offset
          description: The offset of the first item to return.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            exclusiveMinimum: 0
            default: 100
            title: Limit
          description: The number of items to return.
        - name: chain
          in: query
          required: true
          schema:
            type: string
            enum:
              - arbitrum
              - base
              - bsc
              - ethereum
              - hyperevm
              - tempo
            title: Chain
            default: ethereum
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - tvl_usd
              - liquidity_usd
              - lltv
            title: MorphoMarketOrderBy
            description: >-
              Columns the Morpho markets list can be ordered by. All are stored
              by the

              indexer, so ordering + paging happen on the DB set before the
              (expensive)

              per-market on-chain enrichment — only the requested page is read
              on-chain.
            default: tvl_usd
          description: Field to order the markets by before paginating.
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            title: Direction
            default: desc
          description: Order direction (asc/desc).
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MorphoMarketsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.credit.credit_morpho_markets(chain=models.V2CreditMorphoMarketsChain.ETHEREUM, offset=0, limit=100, order_by=models.MorphoMarketOrderBy.TVL_USD, direction=models.V2CreditMorphoMarketsDirection.DESC)

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.credit.creditMorphoMarkets({
                offset: 0,
                limit: 100,
                chain: "ethereum",
                orderBy: "tvl_usd",
                direction: "desc",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    MorphoMarketsResponse:
      properties:
        total:
          type: integer
          title: Total
        offset:
          type: integer
          title: Offset
        limit:
          type: integer
          title: Limit
        morpho:
          type: string
          title: Morpho
          description: Morpho Blue singleton contract the markets were read from.
        markets:
          items:
            $ref: '#/components/schemas/MorphoLendingMarket'
          type: array
          title: Markets
          description: >-
            This page of lending markets (already ordered) with live LLTV, APYs,
            utilization, and liquidity. `total` is the full market count.
          default: []
          example:
            - available_liquidity: '26607268.0000000000'
              borrow_apy: '4.4410000000'
              collateral_token: '0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf'
              collateral_token_decimals: 8
              collateral_token_symbol: cbBTC
              fee: '0.0000000000'
              irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC'
              lltv: '86.0000000000'
              loan_token: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'
              loan_token_decimals: 6
              loan_token_symbol: USDC
              market_id: >-
                0x64d65c9a2d91c36d56fbc42d69e979335320169b3df63bf92789e2c8883fcc64
              oracle: '0xA6D6950c9F177F1De7f7757FB33539e3Ec60182a'
              supply_apy: '4.0110000000'
              total_borrow_assets: '247694465.0000000000'
              total_supply_assets: '274301733.0000000000'
              utilization: '90.3000000000'
      type: object
      required:
        - total
        - offset
        - limit
        - morpho
      title: MorphoMarketsResponse
      description: >-
        A page of Morpho Blue lending markets, ordered + paginated on the DB
        set;

        each returned market is enriched with live on-chain
        LLTV/APY/utilisation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MorphoLendingMarket:
      properties:
        market_id:
          type: string
          title: Market Id
          description: >-
            Morpho Blue market id — the bytes32 keccak of the market's
            (loanToken, collateralToken, oracle, irm, lltv) tuple. Pass this to
            the Morpho credit actions to identify the market.
        loan_token:
          type: string
          title: Loan Token
          description: Token that is supplied and borrowed in this market.
        loan_token_symbol:
          type: string
          title: Loan Token Symbol
          description: Symbol of the loan token (e.g. USDC).
        loan_token_decimals:
          type: integer
          title: Loan Token Decimals
          description: Decimals of the loan token.
        collateral_token:
          type: string
          title: Collateral Token
          description: Token accepted as collateral in this market.
        collateral_token_symbol:
          type: string
          title: Collateral Token Symbol
          description: Symbol of the collateral token (e.g. wstETH).
        collateral_token_decimals:
          type: integer
          title: Collateral Token Decimals
          description: Decimals of the collateral token.
        oracle:
          type: string
          title: Oracle
          description: Oracle pricing the collateral in loan-token terms for this market.
        irm:
          type: string
          title: Irm
          description: Interest rate model contract of this market.
        lltv:
          type: string
          title: Lltv
          description: >-
            Liquidation loan-to-value in percentage (e.g. 86 means a position is
            liquidatable once debt exceeds 86% of collateral value).
        supply_apy:
          anyOf:
            - type: string
            - type: 'null'
          title: Supply Apy
          description: >-
            Current supply APY for lending the loan token, in percentage (e.g.
            3.5 means 3.5%). Null if the rate is unavailable.
        borrow_apy:
          anyOf:
            - type: string
            - type: 'null'
          title: Borrow Apy
          description: >-
            Current borrow APY for the loan token, in percentage (e.g. 5.25
            means 5.25%). Null if the rate is unavailable.
        collateral_intrinsic_apy:
          anyOf:
            - type: string
            - type: 'null'
          title: Collateral Intrinsic Apy
          description: >-
            What the COLLATERAL token earns inside its own price, in percentage:
            an ERC-4626 share's vault yield or a staking token's rewards,
            trailing 7 days. Morpho holds collateral without lending it out, so
            this is the collateral leg's ENTIRE yield. Null means unmeasured,
            NOT zero — a plain token (WETH, cbBTC) earns nothing and a
            yield-bearing one may simply not be indexed yet.
        loan_intrinsic_apy:
          anyOf:
            - type: string
            - type: 'null'
          title: Loan Intrinsic Apy
          description: >-
            What the LOAN token earns inside its own price, in percentage,
            trailing 7 days. Debt owed in such a token grows by this on top of
            borrow_apy — a borrower's true cost is their sum. Null means
            unmeasured, NOT zero.
        collateral_yield_kind:
          anyOf:
            - type: string
              const: fixed
            - type: 'null'
          title: Collateral Yield Kind
          description: >-
            Set to 'fixed' when collateral_intrinsic_apy is locked in until a
            maturity date rather than measured over a trailing window, as it is
            for a principal token. Clients should label such a rate as fixed to
            maturity instead of a 7-day average. Absent for every other market.
        pt_maturity:
          anyOf:
            - type: string
            - type: 'null'
          title: Pt Maturity
          description: >-
            Maturity date of the principal-token collateral, ISO-8601 UTC.
            Present only on principal-token markets.
        pt_expired:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Pt Expired
          description: >-
            Whether the principal-token collateral has passed its maturity.
            Matured markets stay listed so open positions can still be unwound,
            so clients should use this to disable opening rather than to hide
            the row. Present only on principal-token markets.
        pt_loopable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Pt Loopable
          description: >-
            Whether a NEW loop may be opened on this principal-token market.
            False once the market is matured or too close to maturity to earn
            back a loop's entry cost. Computed server-side, so clients need no
            copy of the threshold. Present only on principal-token markets.
        utilization:
          type: string
          title: Utilization
          description: Borrowed share of supplied assets, in percentage 0-100.
        total_supply_assets:
          type: string
          title: Total Supply Assets
          description: Total loan tokens supplied to the market, in token units.
        total_borrow_assets:
          type: string
          title: Total Borrow Assets
          description: Total loan tokens borrowed from the market, in token units.
        available_liquidity:
          type: string
          title: Available Liquidity
          description: >-
            Loan tokens available to borrow or withdraw (supplied - borrowed),
            in token units.
        fee:
          type: string
          title: Fee
          description: >-
            Protocol fee taken from interest, in percentage of interest (e.g. 0
            means no fee).
        tvl_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Tvl Usd
          description: >-
            Total value locked (total supplied assets) in USD, sourced from the
            indexer. Null if the indexer hasn't priced this market yet.
        liquidity_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Liquidity Usd
          description: >-
            Available liquidity (supplied - borrowed) in USD, sourced from the
            indexer. Null if the indexer hasn't priced this market yet.
      additionalProperties: false
      type: object
      required:
        - market_id
        - loan_token
        - loan_token_symbol
        - loan_token_decimals
        - collateral_token
        - collateral_token_symbol
        - collateral_token_decimals
        - oracle
        - irm
        - lltv
        - utilization
        - total_supply_assets
        - total_borrow_assets
        - available_liquidity
        - fee
      title: MorphoLendingMarket
      description: 'A Morpho Blue lending market: one isolated (collateral, loan) pair.'
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````

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