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

# Get Market

> Get data & metrics for a specific Morpho market.

Including:
- Current, daily, weekly, monthly, yearly APY
- Collateral & loan asset data
- Liquidation loan-to-value ratio
- Collateral, borrow & liquidity value
- Utilization ratio
- Pertinent metadata
- Whitelist status



## OpenAPI

````yaml /v1/combined_spec.json get /v1/morpho/market
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:
  /v1/morpho/market:
    get:
      tags:
        - Morpho
      summary: Get Market
      description: |-
        Get data & metrics for a specific Morpho market.

        Including:
        - Current, daily, weekly, monthly, yearly APY
        - Collateral & loan asset data
        - Liquidation loan-to-value ratio
        - Collateral, borrow & liquidity value
        - Utilization ratio
        - Pertinent metadata
        - Whitelist status
      operationId: v1_morpho_market
      parameters:
        - name: chain
          in: query
          required: true
          schema:
            type: string
            enum:
              - arbitrum
              - base
              - ethereum
            title: Chain
            default: base
        - name: unique_market_key
          in: query
          required: true
          schema:
            type: string
            pattern: ^0x.*
            title: Unique Market Key
            default: '0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5'
          description: >-
            The key that uniquely identifies the market. This can be found using
            the 'Get Markets' endpoint.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MorphoGetMarketResponse'
        '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.morpho.morpho_market(chain=models.V1MorphoMarketChain.BASE, unique_market_key="0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5")

                # 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.morpho.morphoMarket({
                chain: "base",
                uniqueMarketKey: "0x3b3769cfca57be2eaed03fcc5299c25691b77781a1e124e7a8d520eb9a7eabb5",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    MorphoGetMarketResponse:
      properties:
        whitelisted:
          type: boolean
          title: Whitelisted
          description: Whether the market is whitelisted or not.
        lltv:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Lltv
          description: >-
            (Liquidation Loan-To-Value) Maximum borrowing percentage before
            liquidation risk. Scaled by 1e18.
        dailyApys:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__ApyData
          description: The daily APYs of the market.
        weeklyApys:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__ApyData
          description: The weekly APYs of the market.
        monthlyApys:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__ApyData
          description: The monthly APYs of the market.
        yearlyApys:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__ApyData
          description: The yearly APYs of the market.
        allTimeApys:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__ApyData
          description: The all-time APYs of the market.
        collateralAsset:
          anyOf:
            - $ref: >-
                #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__Asset
            - type: 'null'
          description: Data of the underlying collateral asset of the market.
        loanAsset:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__Asset
          description: Data of the underlying loan asset of the market.
        state:
          $ref: >-
            #/components/schemas/compass__api_backend__v1__models__morpho__read__response__get_market__MarketState
          description: The current state of the Morpho market.
      type: object
      required:
        - whitelisted
        - lltv
        - dailyApys
        - weeklyApys
        - monthlyApys
        - yearlyApys
        - allTimeApys
        - loanAsset
        - state
      title: MorphoGetMarketResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    compass__api_backend__v1__models__morpho__read__response__get_market__ApyData:
      properties:
        borrowApy:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Borrowapy
        netBorrowApy:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Netborrowapy
        netSupplyApy:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Netsupplyapy
        supplyApy:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Supplyapy
      type: object
      required:
        - borrowApy
        - netBorrowApy
        - netSupplyApy
        - supplyApy
      title: ApyData
    compass__api_backend__v1__models__morpho__read__response__get_market__Asset:
      properties:
        address:
          type: string
          title: Address
        symbol:
          type: string
          title: Symbol
        name:
          type: string
          title: Name
        decimals:
          type: integer
          title: Decimals
        priceUsd:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Priceusd
        logoURI:
          anyOf:
            - type: string
            - type: 'null'
          title: Logouri
      type: object
      required:
        - address
        - symbol
        - name
        - decimals
        - priceUsd
        - logoURI
      title: Asset
    compass__api_backend__v1__models__morpho__read__response__get_market__MarketState:
      properties:
        utilization:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Utilization
        collateralAssets:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Collateralassets
        collateralAssetsUsd:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Collateralassetsusd
        borrowAssets:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Borrowassets
        borrowAssetsUsd:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Borrowassetsusd
        liquidityAssets:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Liquidityassets
        liquidityAssetsUsd:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Liquidityassetsusd
        totalLiquidity:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Totalliquidity
        totalLiquidityUsd:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Totalliquidityusd
      type: object
      required:
        - utilization
        - borrowAssets
        - liquidityAssets
        - totalLiquidity
      title: MarketState
    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).

````