Public API.

Every page on LOANWatch is powered by a small set of JSON endpoints. They're public, unauthenticated, edge-cached, and CORS-open — feel free to build against them.

v0 — schemas may change. These endpoints are stable enough for market-maker dashboards and internal tools, but breaking changes may land without notice. If you're building something durable against them, ping @paulgnz first so we can freeze a version for you.

CORS: * · No auth · Cache: 30–120s at the edge
GET /api/summary Protocol-wide state

Top-line stats: total borrowed USD, total reserves, per-market rates, treasury balances (fee.loan + fee.liqd). One call gives you the whole protocol pulse.

$ curl https://loanwatch.protonnz.com/api/summary
Response shape
{
  "timestamp": "2026-07-23T19:00:51Z",
  "totalBorrowedUsd": 11435099.46,
  "totalReservesUsd": 131452.78,
  "treasuries": {
    "fee.loan": {
      "balances": { "XPR": 206388.36, "XMD": 1841.64, "XBTC": 0.00030127, ... },
      "usd": 6118.77
    },
    "fee.liqd": { "balances": { ... }, "usd": ... }
  },
  "markets": [
    { "symbol": "XPR", "borrowedUsd": 353872, "suppliedUsd": 6432101, "borrowRate": 0.042, ... },
    ...
  ]
}
GET /api/health Health factors + liquidation risk

Every borrower's health factor: HF = (Σ suppliedUsd × collateralFactor) / debtUsd. Segmented by risk band (liquidatable / danger / warning / caution / safe). The atRisk array is HF-sorted from most-at-risk down — this is what liquidators watch.

$ curl https://loanwatch.protonnz.com/api/health
Response shape
{
  "timestamp": "2026-07-23T19:01:07Z",
  "totalBorrowers": 1844,
  "byBand": {
    "liquidatable": 59,
    "danger": 345,
    "warning": 384,
    "caution": 370,
    "safe": 686
  },
  "totalAtRiskDebt": 4717112.46,
  "atRisk": [
    {
      "account": "jacobs",
      "debtUsd": 18.41,
      "collateralUsd": 16.20,
      "collateralAdjustedUsd": 12.96,
      "healthFactor": 0.7041,
      "riskBand": "liquidatable",
      "borrows": { "XUSDC": { "amt": 18.41, "usd": 18.41 } },
      "supplies": { "LUSDC": { "amt": 16.20, "underlyingUsd": 16.20 } }
    },
    ...
  ],
  "danger": [ ... HF 1.0–1.2 ],
  "topByDebt": [ ... largest positions regardless of HF ]
}
GET /api/positions Longs, shorts, and per-account exposure

Every open position: who's borrowing what (short/leverage-financing), who's supplied what (long). perAsset aggregates USD flows by symbol. topBorrowers[SYMBOL] lists the largest short/borrower positions for that market. topAccounts ranks accounts by gross exposure.

$ curl https://loanwatch.protonnz.com/api/positions
Response shape
{
  "timestamp": "2026-07-23T18:55:00Z",
  "totalBorrowers": 1844,
  "perAsset": [
    {
      "asset": "XPR",
      "borrowedUsd": 353872.15,
      "suppliedUsd": 6432101.94,
      "borrowerCount": 342,
      "supplierCount": 1211,
      "category": "volatile"
    },
    ...
  ],
  "topBorrowers": {
    "XPR": [
      { "account": "dkffkd", "amt": 36121488.79, "usd": 91575.56 },
      ...
    ],
    "XBTC": [ ... ],
    "XUSDC": [ ... ]
  },
  "topSuppliers": { ... },
  "topAccounts": [
    {
      "account": "unicorn3",
      "longUsd": 1348091.83,
      "shortUsd": 531588.43,
      "netUsd": 816503.40,
      "assets": 5
    },
    ...
  ]
}
GET /api/fees Protocol fee inflows since July 14

All fee inflows to fee.loan (redemption fees) and fee.liqd (50/50 liquidation split) since fees went live on 2026-07-14. Daily breakdowns, run-rate projection, per-symbol totals, and the last 200 raw transfer events with memos.

$ curl https://loanwatch.protonnz.com/api/fees
Response shape
{
  "timestamp": "2026-07-23T19:01:32Z",
  "grandUsd": 8919.67,
  "grandEvents": 905,
  "perTreasury": {
    "fee.loan": {
      "events": 712,
      "usd": 6112.09,
      "bySymbol": {
        "XUSDC": { "events": 75, "amount": 590.69, "usd": 590.69 },
        "XPR":   { "events": 142, "amount": 206275.86, "usd": 522.98 },
        ...
      }
    },
    "fee.liqd": { ... }
  },
  "daily": [
    { "date": "2026-07-14", "usd": 823.11, "events": 47 },
    ...
  ],
  "recent": [
    { "ts": "2026-07-23T18:52:41Z", "from": "vendetta", "to": "fee.liqd", "amt": 2104.22, "sym": "XMD", "memo": "liquidation protocol fee" },
    ...
  ],
  "runRate": {
    "usdPerDay": 976.12,
    "usdPerYear": 356283.80
  }
}

A few things worth knowing before you build against these: