行情区:K线全屏、可选技术指标与交易所价格精度对齐
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -276,6 +276,19 @@ def resolve_chart_bars(
|
||||
if len(db_rows) > need:
|
||||
db_rows = db_rows[-need:]
|
||||
|
||||
if price_tick is None:
|
||||
try:
|
||||
tick_probe = remote_fetch(
|
||||
symbol=sym,
|
||||
timeframe=tf,
|
||||
since_ms=None,
|
||||
limit=3,
|
||||
)
|
||||
if tick_probe.get("ok"):
|
||||
price_tick = tick_probe.get("price_tick")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
candles = _to_chart_candles(db_rows)
|
||||
if not candles:
|
||||
return {"ok": False, "msg": remote_err or "无 K 线数据", "purged": purged}
|
||||
|
||||
Reference in New Issue
Block a user