refactor: 统一价格入口 mo_data.get_price() - 22个脚本移除自拉腾讯API
所有价格获取统一走 mo_data.get_price() / get_prices_batch():
- 优先读 live_prices(DB) → 无/过期才调 stock_quote(API) → 自动写回DB
- 22个脚本全部替换:branch_scanner chip_factors divergence_detector
market_screener mo_provider mofin_collect monitor_300308 300308_monitor
multi_timeframe refresh_macro_context stale_detector stale_push_wlin
stock_profile strategy_evaluator strategy_lifecycle strategy_review
strategy-staleness-check technical_analysis xiaoguo_signal_consumer
collect_evaluation_data
This commit is contained in:
@@ -10,7 +10,8 @@ from mo_data import read_portfolio, read_decisions, read_watchlist
|
||||
from mofin_db import get_conn, write_watchlist_stock, write_holding_strategy
|
||||
|
||||
WL = "/home/hmo/web-dashboard/data/watchlist.json" # 路径保留用于历史备份兼容,数据实际走DB
|
||||
DEC = "/home/hmo/web-dashboard/data/decisions.json" # 同上
|
||||
# 决策数据全部从DB读取,json文件已移除
|
||||
DEC = "/home/hmo/web-dashboard/data/decisions.json" # 保留常量但不再使用,防止引用报错
|
||||
|
||||
holding_codes = set()
|
||||
pf = read_portfolio()
|
||||
@@ -67,9 +68,9 @@ if dec_changed:
|
||||
conn.close()
|
||||
# [migrated to DB] — cold backup removed
|
||||
# json.dump(dec, open(DEC, "w"), indent=2, ensure_ascii=False)
|
||||
print(f"\ndecisions.json: {dec_changed} 只更新标签")
|
||||
print(f"\ndecisions数据: {dec_changed} 只更新标签")
|
||||
else:
|
||||
print(f"\ndecisions.json: 无需更新")
|
||||
print(f"\ndecisions数据: 无需更新")
|
||||
|
||||
# ── 反过程:清仓股自动加回自选 ──
|
||||
# 找出曾持仓但现已不在 portfolio 的股票
|
||||
|
||||
Reference in New Issue
Block a user