{
  "service": "wyw-panel",
  "site": {
    "name": "屯昌预言家",
    "en": "TUNCHANG ORACLE",
    "tagline": "BTC 每小时涨跌预测 · 战报看板"
  },
  "origin": "https://wyw.7inv.uk",
  "auth": {
    "type": "Bearer token",
    "header": "Authorization: Bearer $WYW_TOKEN",
    "alternative": "X-Ingest-Token: $WYW_TOKEN",
    "note": "写入接口需要令牌；读取接口完全公开。"
  },
  "payload": {
    "text": "自由中文战报。每段以「第 N 轮」开头，结算块写成「第 N 轮结算（11 点 ET）：赢/输」。日期按战报中的美东整点换算，日期可省略（取最近一次已过去的美东整点）。",
    "structured": {
      "rounds": [
        {
          "roundNo": 7,
          "settledAt": "2026-11-09T16:00:00.000Z",
          "hourEt": "11 点 ET",
          "direction": "up",
          "result": "win",
          "openPrice": 76073.75,
          "closePrice": 76210.4,
          "stake": 1,
          "capitalBefore": 6.67,
          "capitalAfter": 7.52,
          "text": "第 7 轮结算（11 点 ET）：赢 ✅ …"
        }
      ]
    }
  },
  "examples": [
    {
      "title": "推送一条战报",
      "method": "POST",
      "url": "https://wyw.7inv.uk/api/rounds",
      "headers": {
        "Authorization": "Bearer $WYW_TOKEN",
        "Content-Type": "application/json"
      },
      "body": {
        "text": "第 5 轮结算（11 点 ET）：输 ❌\n· 开盘 $76,073.75 → 收盘 $75,780.22，跌了 $293.53，Down 赢\n· 押涨 $1.18 全没了，本金：$7.85 → $6.67"
      }
    },
    {
      "title": "一次推送整段战报（可含多轮）",
      "method": "POST",
      "url": "https://wyw.7inv.uk/api/rounds",
      "headers": {
        "Authorization": "Bearer $WYW_TOKEN",
        "Content-Type": "text/plain"
      },
      "body": "第 3 轮结算（9 点 ET）：赢 ✅\n· 押涨 $0.65，本金：$6.34 → $6.99"
    },
    {
      "title": "设置当前/下一轮预测",
      "method": "PUT",
      "url": "https://wyw.7inv.uk/api/next",
      "headers": {
        "Authorization": "Bearer $WYW_TOKEN",
        "Content-Type": "application/json"
      },
      "body": {
        "roundNo": 7,
        "hourEt": "10 点 ET",
        "direction": "up",
        "stake": 1,
        "note": "模型置信度 0.62"
      }
    },
    {
      "title": "读取看板数据",
      "method": "GET",
      "url": "https://wyw.7inv.uk/api/summary",
      "headers": {}
    },
    {
      "title": "删除一条轮次",
      "method": "DELETE",
      "url": "https://wyw.7inv.uk/api/rounds/12",
      "headers": {
        "Authorization": "Bearer $WYW_TOKEN"
      }
    }
  ],
  "responses": {
    "round": {
      "id": 12,
      "roundNo": 5,
      "settledAt": "2026-11-09T16:00:00.000Z",
      "hourEt": "11 点 ET",
      "direction": "up",
      "result": "loss",
      "openPrice": 76073.75,
      "closePrice": 75780.22,
      "stake": 1.18,
      "capitalBefore": 7.85,
      "capitalAfter": 6.67,
      "pnl": -1.18,
      "rawText": "…"
    },
    "stats": {
      "total": 5,
      "wins": 2,
      "losses": 3,
      "winRate": 0.4,
      "streak": {
        "type": "loss",
        "count": 2
      },
      "last24h": {
        "total": 4,
        "wins": 2,
        "losses": 2,
        "winRate": 0.5
      },
      "pnl": -1.18,
      "capital": {
        "start": 1,
        "latest": 6.67,
        "curve": [
          {
            "t": "…",
            "v": 2.1
          }
        ]
      }
    }
  },
  "rules": [
    "同一轮次（roundNo + 美东整点）重复推送会覆盖，不会重复计数。",
    "战报里可以夹带「下一轮已锁」的段落，但不会被当作结算；下一轮请用 PUT /api/next。",
    "写入成功后如果该轮次已经超过 /api/next 的轮次，会自动清空当前预测。",
    "结果只认 win / loss；战报写「赢/输」「✅/❌」「win/loss」都能解析。",
    "看板每 60 秒刷新一次行情，战报需点右上角刷新或重新打开。"
  ]
}