{
 "name": "kimpremium",
 "title": "Korea Retail Leverage Monitor",
 "description": "Public read-only API for the Korean retail-leverage / kimchi-premium dashboard: leverage thermometer, R2 financing ratio, forced-liquidation, ETF flows. Official daily statistics (KOFIA / KSD SEIBro / Naver).",
 "base_url": "https://kimpremium.com",
 "auth": "none",
 "cors": true,
 "poll": {
  "recommended_endpoint": "/api/v1/summary",
  "cadence": "1/day is enough (data updates ~3x/day KST); intraday polling is fine but wasteful",
  "alert_on": "alert.level == 'critical', OR any change in alert.level vs the last poll"
 },
 "alert_metric": {
  "field": "leverage_thermometer / alert",
  "thresholds": {
   "warning": 40,
   "critical": 45,
   "unit": "percent"
  },
  "meaning": "ETF leverage thermometer = (margin balance + leveraged-ETF cumulative net creation @cost) / investor deposits, anchored 2024-01-02"
 },
 "endpoints": [
  {
   "route": "GET /api/v1/summary",
   "desc": "当前状态 + 告警等级（agents 轮询这个）"
  },
  {
   "route": "GET /api/v1/health",
   "desc": "存活 + 数据新鲜度（stale_days, level）"
  },
  {
   "route": "GET /api/v1/meta",
   "desc": "KPI 快照 + 数据范围（meta.json）"
  },
  {
   "route": "GET /api/v1/thermo",
   "desc": "杠杆温度计明细 + ETF universe（约 38 只）"
  },
  {
   "route": "GET /api/v1/series",
   "desc": "R2 全历史 7,100+ 交易日；?fields=d,r2&since=YYYYMMDD 可裁剪"
  },
  {
   "route": "GET /data/{series,meta,etf}.json",
   "desc": "前端原始载荷（向后兼容）"
  }
 ],
 "docs": {
  "human": "https://kimpremium.com/api",
  "agent": "https://kimpremium.com/api/agent.md",
  "openapi": "https://kimpremium.com/api/openapi.json"
 },
 "monitoring_recipes": {
  "avibe_watch": "vibe watch add --name kimpremium-thermo --interval 1d --message 'KR 杠杆温度计告警：见 https://kimpremium.com' -- bash -c 'curl -s https://kimpremium.com/api/v1/summary | jq -e \".alert.level==\\\"critical\\\"\"'",
  "generic_bash": "curl -s https://kimpremium.com/api/v1/summary | jq '{asof, level: .alert.level, thermo: .alert.value, msg: .alert.message}'"
 },
 "disclaimer": "Research visualization of public market statistics. Not investment advice."
}