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

# Get Market Metrics

> Retrieve live on-chain metrics for a lending market

Returns real-time market data read directly from the smart contract: total liquidity, borrows, utilization, borrow rate, and pending liquidation debt.

## Path Parameters

<ParamField path="marketId" type="string" required>
  Market ID.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="isOnChain" type="boolean">Whether on-chain data was successfully fetched</ResponseField>
    <ResponseField name="totalDeposits" type="string">Total USDC deposited by LPs (6-decimal formatted)</ResponseField>
    <ResponseField name="totalBorrows" type="string">Total USDC currently borrowed</ResponseField>
    <ResponseField name="availableLiquidity" type="string">USDC available for new borrows</ResponseField>
    <ResponseField name="utilizationRate" type="string">Utilization in basis points</ResponseField>
    <ResponseField name="borrowRate" type="string">Annual borrow rate in basis points</ResponseField>
    <ResponseField name="supplyRate" type="string">Annual supply rate in basis points</ResponseField>
    <ResponseField name="activeLoans" type="integer">Number of open loans</ResponseField>
    <ResponseField name="activeAuctions" type="integer">Number of active Dutch auctions</ResponseField>
    <ResponseField name="pendingLiquidations" type="integer">Pending liquidation debt count</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-stocks/api/markets/{marketId}/metrics" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "isOnChain": true,
      "totalDeposits": "500000.000000",
      "totalBorrows": "125000.000000",
      "availableLiquidity": "375000.000000",
      "utilizationRate": "2500",
      "borrowRate": "450",
      "supplyRate": "84",
      "totalShares": "500000000000.000000000000000000",
      "totalCollateral": "2500.000000000000000000",
      "activeLoans": 12,
      "activeAuctions": 0,
      "pendingLiquidations": 0
    }
  }
  ```
</ResponseExample>
