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

# List Markets

> List all active lending markets for your instance

Returns all active stock lending markets deployed under your instance, including on-chain metrics where available.

## Response Fields

<ResponseField name="success" type="boolean">Request status</ResponseField>

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="markets" type="array">
      Array of market objects. Each includes database fields (`id`, `marketAddress`, `oracleAddress`, `stockTokenSymbol`, `collateralFactor`, `totalDeposits`, `totalBorrows`, etc.) and an `onChain` object with live contract data when available.
    </ResponseField>
  </Expandable>
</ResponseField>

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

  ```typescript TypeScript theme={null}
  const res = await fetch('https://api.trusset.org/lending-stocks/api/markets', {
    headers: { 'X-API-Key': 'trusset_your_key_here' }
  });
  const { data } = await res.json();
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "markets": [
        {
          "id": "clx_market_001",
          "marketAddress": "0x70A0E25c7b768B87e658348B3b577678A173E038",
          "oracleAddress": "0x3b25752c1459C5Cf1b0bfcFdF0D56883c8047423",
          "stockTokenAddress": "0xabc...def",
          "stockTokenSymbol": "tAAPL",
          "collateralFactor": "7500",
          "totalDeposits": "500000.00",
          "totalBorrows": "125000.00",
          "active": true,
          "onChain": {
            "isOnChain": true,
            "totalDeposits": "500000.000000",
            "totalBorrows": "125000.000000",
            "utilizationRate": "2500",
            "borrowRate": "450",
            "supplyRate": "84"
          }
        }
      ]
    },
    "metadata": {
      "requestId": "a1b2c3d4-...",
      "timestamp": "2025-06-15T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>
