INNER CODE UNIT · Python
MonitorWatchInput
simonlin1212/vibe-astock · vr/app.py:293
class MonitorWatchInput(BaseModel):
client_id: str
codes: list[str]
@app.post("/api/monitor/watch")
def monitor_watch(body: MonitorWatchInput):
try:
watchtower.set_client_watch(body.client_id, body.codes)
except ValueError as exc:
raise HTTPException(400, str(exc)) from exc
watchtower.ensure_started()
return {"data": {"ok": True}}
@app.get("/api/market/first-board")
def market_first_board():
"""首板分析:今日首板涨停股(连板数=1)+ 涨停原因题材串(问财,缺 key 优雅降级)。