看股功能更新

This commit is contained in:
2026-08-15 15:36:11 +08:00
parent c1c43d2ff7
commit 9cce670b74
26 changed files with 957 additions and 427 deletions

View File

@@ -18,6 +18,8 @@ class CandleOut(BaseModel):
low: float
close: float
volume: float
amount: float | None = None # 成交额(元);无数据为 null
turnover: float | None = None # 换手率 %;无数据为 null
model_config = {"from_attributes": True}
@@ -264,6 +266,7 @@ class PreviewResponse(BaseModel):
candles: list[CandleOut]
indicators: dict[str, dict[str, list[float | None]]] = Field(default_factory=dict)
# indicators 形如 {"ma": {"ma5": [...], ...}, "macd": {"dif": ...}, "kdj": {...}, "rsi": {...}, "boll": {...}}
has_more: bool = False # 返回窗口之前是否还有更早历史(前端向左滚动翻页用)
# ---------- Auth ----------