{
  "openapi": "3.0.3",
  "info": {
    "title": "SMC Smart Money Radar 開放資料 API",
    "description": "台股盤後選股訊號的唯讀公開資料(結果與績效;不含任何演算法因子)。每交易日約 18:30 後更新。資料僅供市場研究參考,不構成投資建議、買賣推薦或獲利保證;引用請註明來源 smcstocks.com。AI 代理亦可改用 MCP 端點:POST https://smcstocks.com/mcp (streamable HTTP,免金鑰)。",
    "version": "1.0.0",
    "contact": { "url": "https://smcstocks.com/about/" }
  },
  "servers": [{ "url": "https://smcstocks.com" }],
  "paths": {
    "/data/index.json": {
      "get": {
        "operationId": "listSignalDates",
        "summary": "可查詢的訊號日期索引",
        "responses": { "200": { "description": "{dates:[YYYYMMDD…], latest}" } }
      }
    },
    "/data/signal_{date}.json": {
      "get": {
        "operationId": "getDailySignals",
        "summary": "指定交易日的黃金訊號與觀察名單",
        "parameters": [{ "name": "date", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^\\d{8}$" }, "description": "YYYYMMDD" }],
        "responses": { "200": { "description": "{date, funnel, alerts:[…], watch:[…]};alerts/watch 各含 id,name,market,strength(1-5),close,chg_pct,vol_ratio,foreign,trust,main_force,support,tp_round 等公開欄位" }, "404": { "description": "該日無資料" } }
      }
    },
    "/data/history.json": {
      "get": {
        "operationId": "getSignalHistory",
        "summary": "全部歷史訊號與訊號後績效",
        "responses": { "200": { "description": "{updated_at, records:[{id,name,market,type,date,price,strength,vol_ratio,r5,r10,r20,hi5,hi10,hi20,dd,final}]};r/hi/dd 為 %;null=未滿天數(計算中);final=true 已定案不再變動" } }
      }
    },
    "/data/stock_{symbol}.json": {
      "get": {
        "operationId": "getStock",
        "summary": "個股最新狀態與該股歷史訊號",
        "parameters": [{ "name": "symbol", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^[1-9][0-9]{3}$" }, "description": "台股四位數代號,例如 2330" }],
        "responses": { "200": { "description": "{found,id,name,market,close,chg_pct,date,status(golden|watch|none),ma5,ma20,hi20,lo20,vol,vol_ma5,records:[…]}" } }
      }
    },
    "/data/universe.json": {
      "get": {
        "operationId": "listUniverse",
        "summary": "全市場普通股代號清單",
        "responses": { "200": { "description": "{date, ids:[…]}" } }
      }
    }
  }
}
