Skip to content

Instantly share code, notes, and snippets.

@patcito
Created February 19, 2026 18:18
Show Gist options
  • Select an option

  • Save patcito/0109616149b06b42ca8a7d8dcf42b840 to your computer and use it in GitHub Desktop.

Select an option

Save patcito/0109616149b06b42ca8a7d8dcf42b840 to your computer and use it in GitHub Desktop.
GET /mm/lend — Lending Overview Endpoint

GET /mm/lend — Lending Overview Endpoint

Returns full lending data across all chains with per-asset metrics, APY rates, token prices, and optional user positions.

Parameters

Param Type Required Description
user string No User wallet address. If omitted, all user-specific fields are 0.

Example

GET /mm/lend
GET /mm/lend?user=0xABC123...

Response Shape

{
  "success": true,
  "data": {
    "globalMetrics": {
      "totalSuppliedUsd": 12500000.50,
      "totalAvailableUsd": 8000000.25,
      "totalBorrowedUsd": 4500000.25,
      "totalEarningsUsd": 0
    },
    "userMetrics": {
      "totalSuppliedUsd": 5000.0,
      "totalBorrowedUsd": 1200.0,
      "totalEarningsUsd": 0,
      "claimableEarningsUsd": 0,
      "healthFactor": 1.85,     // null when no user or no positions
      "netApyPct": 3.25         // null when no user or no positions
    },
    "chains": [
      {
        "chainId": 146,
        "chainName": "Sonic",
        "globalMetrics": {
          "totalSuppliedUsd": 12500000.50,
          "totalAvailableUsd": 8000000.25,
          "totalBorrowedUsd": 4500000.25,
          "totalEarningsUsd": 0
        },
        "userMetrics": {
          "totalSuppliedUsd": 5000.0,
          "totalBorrowedUsd": 1200.0,
          "totalEarningsUsd": 0,
          "claimableEarningsUsd": 0,
          "healthFactor": 1.85,
          "netApyPct": 3.25
        },
        "assets": [
          {
            "address": "0x29219dd400f2Bf60E5a23d13Be72B486D4038894",
            "symbol": "USDC",
            "name": "USD Coin",
            "decimals": 6,
            "tokenprice": 1.0,
            "isSuppliable": true,
            "isBorrowable": true,
            "supplyApyPct": 4.02,
            "borrowApyPct": 5.15,
            "userMetrics": {
              "walletBalance": 1500.0,
              "walletBalanceUsd": 1500.0,
              "totalSupplied": 5000.0,
              "totalSuppliedUsd": 5000.0,
              "totalBorrowed": 1200.0,
              "totalBorrowedUsd": 1200.0,
              "totalAvailable": 8000000.0,
              "totalAvailableUsd": 8000000.0,
              "totalEarnings": 0,
              "totalEarningsUsd": 0,
              "claimableEarnings": 0,
              "claimableEarningsUsd": 0
            },
            "globalMetrics": {
              "totalSupplied": 12500000.50,
              "totalSuppliedUsd": 12500000.50,
              "totalAvailable": 8000000.25,
              "totalAvailableUsd": 8000000.25,
              "totalBorrowed": 4500000.25,
              "totalBorrowedUsd": 4500000.25,
              "totalEarnings": 0,
              "totalEarningsUsd": 0,
              "utilizationPct": 0.36
            }
          }
          // ... more assets
        ]
      }
      // ... more chains
    ]
  }
}

Field Notes

  • All numeric values are decimalized floats — e.g. 1500 USDC is 1500.0, not 1500000000.
  • tokenprice — USD per token as a float.
  • supplyApyPct / borrowApyPct / netApyPct — percentages: 4.02 means 4.02%.
  • utilizationPct — 0–1 range: 0.36 means 36%.
  • healthFactor — float: 1.85 means 185%. null when no user or no positions.
  • totalEarningsUsd / claimableEarningsUsd — always present (0 when not applicable). Aggregated from per-asset to chain to global level.
  • When user is not provided, all userMetrics numeric fields are 0 and healthFactor/netApyPct are null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment