{
 "openapi": "3.0.3",
 "info": {
  "title": "DueWall Public API — tokenized credit maturities, terms & NAV",
  "description": "Free public JSON API for tokenized private credit (RWA): structured maturity events (schema v1.2, incl. paid/liquidated resolutions), human-verified liquidity terms per fund (JAAA, JTRSY, SPXA, NYHB, SIEM), daily on-chain NAV/price series (one point per UTC day per pool token), daily NET capital flows per fund (conservation-exact, rules FLW2), and on-chain pool NAV and TVL/APY coverage. Every record carries its coverage grade (A/B/M — see /coverage/). Served as static JSON — CORS enabled, no key required, CC-BY 4.0 (attribution 'DueWall Labs (duewall.com)'). The forward-looking maturity calendar and the trading-side flow layer for tokenized credit.",
  "version": "1.0.0",
  "contact": {
   "name": "DueWall Labs",
   "email": "hello@duewall.com",
   "url": "https://duewall.com"
  },
  "license": {
   "name": "CC-BY-4.0 (data) / MIT (adapters)",
   "url": "https://duewall.com"
  }
 },
 "servers": [
  {
   "url": "https://duewall.com/api/v1",
   "description": "Production (static JSON, daily refresh)"
  }
 ],
 "paths": {
  "/events.json": {
   "get": {
    "summary": "All structured events",
    "description": "Maturity, maturity_resolution (outcomes), redemption_window and nav_report events. Every record carries source_url, verified_by, status.",
    "responses": {
     "200": {
      "description": "JSON array of events (schema v1.2)"
     }
    }
   }
  },
  "/terms.json": {
   "get": {
    "summary": "Liquidity terms per fund",
    "description": "Human-verified structured terms: min investment, settlement, fees, domicile, AUM.",
    "responses": {
     "200": {
      "description": "JSON array of terms records"
     }
    }
   }
  },
  "/pools.json": {
   "get": {
    "summary": "Pool NAV & TVL/APY snapshot",
    "description": "Centrifuge pool tokens (on-chain NAV) + DefiLlama RWA pools.",
    "responses": {
     "200": {
      "description": "JSON object by source"
     }
    }
   }
  },
  "/flows.json": {
   "get": {
    "summary": "Daily NET capital flows per fund (FLW2)",
    "description": "Per-fund daily net_shares / net_usd / tvl_usd from on-chain totalIssuance daily anchors; conservation-exact (sum of daily deltas = final supply); all-time in/out/net aggregates. Gross order split intentionally not published.",
    "responses": {
     "200": {
      "description": "JSON object (funds + excluded_funds)"
     }
    }
   }
  },
  "/maturity_wall.json": {
   "get": {
    "summary": "Monthly on-chain maturity distribution",
    "description": "Maple sample: monthly aggregate of on-chain maturities (the 266/0 finding).",
    "responses": {
     "200": {
      "description": "JSON object"
     }
    }
   }
  },
  "/price_history.json": {
   "get": {
    "summary": "Daily on-chain token price & pool NAV series",
    "description": "One point per UTC day per Centrifuge pool token (price, NAV in USD). NAV-type oracle value, not a market traded price. Series since 2026-10-31; grows daily.",
    "responses": {
     "200": {
      "description": "JSON object keyed by pool_id:SYMBOL"
     }
    }
   }
  },
  "/index.json": {
   "get": {
    "summary": "DLI — DueWall Lending Index",
    "description": "Rules-based equal-weight NAV index of grade-A tokenized credit pools. Daily values since inception 2026-10-31=100, constituents, rules hash, governance covenants. Never backfilled.",
    "responses": {
     "200": {
      "description": "JSON object"
     }
    }
   }
  },
  "/spreads.json": {
   "get": {
    "summary": "Credit spread ladder",
    "description": "Yield minus 3M Treasury per tracked fund, labeled by yield basis (realized NAV / advertised APY) and coverage grade. Includes grade-level ladder medians.",
    "responses": {
     "200": {
      "description": "JSON object"
     }
    }
   }
  },
  "/dcr.json": {
   "get": {
    "summary": "DCR — DeFi Credit Rate (R1 reference-rate leg)",
    "description": "Sky Savings Rate measured exactly from the on-chain sUSDS accumulator, daily. Rules-hashed, covenants inherited from DLI. Reference series.",
    "responses": {
     "200": {
      "description": "JSON object"
     }
    }
   }
  },
  "/meta.json": {
   "get": {
    "summary": "API metadata",
    "description": "Version, generation date, record counts, license.",
    "responses": {
     "200": {
      "description": "JSON object"
     }
    }
   }
  }
 }
}