● Public API · v0

Read-only Endpoints Anyone Can Hit

Framler exposes a small set of JSON endpoints for status, regime history, track-record stats, math diagnostics, and live quotes - no key required. They power the public pages on this site and are intentionally stable so you can build dashboards, monitors, or research notebooks against them.

◆ What this page is

This is our public API - HTTP endpoints Framler serves at framler.com/api/* that anyone can call. Use them to pull pipeline status, regime history, IC stats, math invariants, single quotes, or sparkline data into your own dashboard, notebook, or uptime monitor.

For the upstream data sources we ingest (SEC EDGAR, ClinicalTrials.gov, PubMed, Yahoo Finance, Finnhub, Financial Modeling Prep, FRED) see the disclaimer and methodology. Enterprise users who want bulk / firehose / webhook access beyond these read endpoints: enterprise@framler.com.

Endpoints

GET/api/healthliveauth: nonecache: no-store

Liveness probe - is the app reachable and is the database talking back?

Returns 200 + status:"ok" when Supabase is reachable, 503 + status:"degraded" otherwise. Designed for uptime monitors. No auth, no caching.

{
  "status":  "ok",
  "checks":  { "supabase": "ok" },
  "timestamp": "2026-04-26T08:14:22.000Z",
  "version": "0.1.0"
}
GET/api/statusliveauth: nonecache: edge 60s

Pipeline freshness - most recent computed_at across each engine layer.

One row per layer: universe scoring, signal accumulation, pharma scoring, BOCPD regime posterior, conformal calibration, Mondrian bins, factor correlations, tail-dependence, Fama-French regression, sector benchmarks, Kalman DLM exposures, adaptive weights. Drives the green/yellow/red dots on /status.

{
  "ok":   true,
  "layers": [
    { "key": "universe",    "label": "Stock universe scoring",    "asOf": "2026-04-26T06:08:11Z", "stale": false },
    { "key": "regime",      "label": "BOCPD regime posterior",    "asOf": "2026-04-26T06:08:23Z", "stale": false },
    { "key": "ff",          "label": "Fama-French regression",    "asOf": null,                     "stale": true  }
  ],
  "headline": "ok",
  "asOf":     "2026-04-26T08:14:22Z"
}
GET/api/track-recordliveauth: nonecache: force-dynamic

Bullish-signal win rate over rolling 90 days, plus aggregate stats.

Returns total signals logged, count with filled 30-day forward returns, bullish win rate, average 30d return, best/worst single return. 30-day forward returns started filling 2026-05-16 (first row 2026-04-16 + 30 days), so early stats lean on small samples. As of 2026-05-17 medians + p25 + p75 are also exposed for outlier-robust reading.

{
  "stats": {
    "total_signals":    4180,
    "with_30d_result":  482,
    "bullish_avg_30d":  2.1,
    "bullish_win_rate": 58.0,
    "best_return":     14.7,
    "worst_return":   -11.2
  },
  "totalSaved":     4180,
  "firstDate":     "2026-04-09",
  "recentSignals":  [ /* last 5 raw signals */ ],
  "generatedAt":   "2026-04-26T08:14:22Z"
}
GET/api/regime-historyliveauth: nonecache: edge 300s

60-day daily HMM regime classification with VIX, breadth, yield-curve overlays.

One row per trading day: regime label (risk_on / transition / risk_off), regime_score, VIX, market breadth %, 10Y-3M yield-curve spread in bps. Powers RegimeTimeline on /dashboard.

{
  "ok":   true,
  "rows": [
    { "date": "2026-02-25", "regime": "risk_on",    "regime_score": 0.72, "vix": 14.8, "breadth_pct": 71, "yield_curve_bps": 12 },
    { "date": "2026-04-25", "regime": "transition", "regime_score": 0.51, "vix": 22.1, "breadth_pct": 49, "yield_curve_bps": -3 }
  ],
  "asOf": "2026-04-26T08:14:22Z"
}
GET/api/diag/engineliveauth: admincache: force-dynamic

Internal invariant battery for the Framler engine — admin-only.

Runs the engine against a battery of mathematical invariants (neutrality, monotonicity, probability validity, multiplier-cap checks, stress-matrix coverage). Returns each check with pass/fail. Admin-gated because the response includes intermediate calibration state.

{
  "passed": N,
  "failed": 0,
  "total":  N,
  "allPass": true,
  "checks": [
    { "name": "neutral z → drift only", "pass": true, "expected": "matches drift", "got": "matches" }
  ],
  "timestamp": "2026-04-27T20:14:22Z"
}
GET/api/quoteliveauth: nonecache: upstream 300s

Single live quote for one ticker.

Proxies Finnhub real-time quote. Cached upstream for 5 minutes. Returns current price (or previous close if market is shut), absolute and percentage change.

Query params
tickerrequiredstring1-10 uppercase letters. Validated server-side.
{
  "price":     189.43,
  "prevClose": 187.12,
  "change":     2.31,
  "changePct":  1.23
}
GET/api/sparklineliveauth: nonecache: force-dynamic

30-day close history + RSI(14) + MA20 for one ticker.

Reads Yahoo Finance chart endpoint (no key needed). Returns the closes array plus computed RSI and 20-day moving average. Used for inline sparklines on /stocks/[ticker] and /compare.

Query params
tickerrequiredstring1-10 uppercase letters. Validated server-side.
{
  "ticker":  "AAPL",
  "closes":  [184.21, 186.40, /* ...30 entries */],
  "rsi":     61,
  "ma20":    187.30
}
GET/api/stocks/[ticker]/factor-attributionliveauth: nonecache: edge 3600s

Secret-safe Shapley factor attribution for one ticker.

Returns per-factor (direction, magnitude bucket, rank) and the dominant confluence pattern for one ticker. Direction ∈ {bullish, bearish, neutral}; magnitude ∈ {high, moderate, low, minimal}; rank 1..13. Does NOT return raw φ values, score-point deltas, or anything that would let an adversary back out the proprietary PRIOR_WEIGHTS via aggregation across the universe. Powers the "Why this score?" bars on /stocks/[ticker]. Admin endpoint /api/admin/shapley returns the raw numbers under a session check.

Query params
tickerrequiredpath1-10 uppercase letters. Must be in the production universe.
{
  "attributions": [
    { "factor": "momentum",  "direction": "bullish", "magnitude": "high",     "rank": 1 },
    { "factor": "quality",   "direction": "bullish", "magnitude": "moderate", "rank": 2 },
    /* ...11 more factors, 13 total */
  ],
  "dominantPattern": { "name": "QUALITY COMPOUNDER", "category": "bullish_quality" }
}

Usage notes

Public API - Framler | Framler