57 lines
2.6 KiB
JSON
57 lines
2.6 KiB
JSON
{
|
||
"module": "scanner",
|
||
"version": "1.0",
|
||
"purpose": "全市场自动选股机制。纯数据驱动(不依赖 LLM),定期从 A 股热门板块筛选符合条件的候选股。",
|
||
|
||
"human_help": {
|
||
"title": "全市场选股扫描",
|
||
"description": [
|
||
"自动化选股管线,每 15 分钟运行一次。纯数据驱动,不依赖外部 LLM。",
|
||
"流程:读热门板块 → 拉腾讯实时行情 → 涨幅>3%+有量 → 评分 → 写入 candidates 表 → 高分推送 XMPP。",
|
||
"候选股在 Dashboard 市场 Tab 的「主力建仓候选」面板展示。"
|
||
],
|
||
"usage": [
|
||
"Dashboard 市场 Tab → 🎯 主力建仓候选 → 查看最近 50 只候选股",
|
||
"Dashboard 信号 Tab → 查看全市场扫描统计",
|
||
"cron: market_scanner.py(每 15 分钟,交易日 9-15)"
|
||
],
|
||
"troubleshooting": [
|
||
"候选池为空 → 检查 market_scanner.py cron 是否运行,sector_snapshots 表是否有数据",
|
||
"行情不更新 → 检查腾讯行情 API 是否可达(qt.gtimg.cn)"
|
||
]
|
||
},
|
||
|
||
"ai_spec": {
|
||
"apis": [
|
||
{"method": "GET", "path": "/api/candidates", "returns": "[{code, name, reason, score_2nd..score_5th, score_final, pass_s2..pass_s5, promoted, promoted_at, log, created_at}] — 最近 50 只候选股"}
|
||
],
|
||
"dependencies": [
|
||
"market_scanner.py — 选股主脚本(cron: */15 9-15 1-5)",
|
||
"mofin_db.py — candidates 表(code, name, price, change_pct, score, entry_low, entry_high, stop_loss, take_profit, source, sector, reason)",
|
||
"market_watch.py — 提供 sector_snapshots 板块数据",
|
||
"腾讯行情 API: http://qt.gtimg.cn/q="
|
||
],
|
||
"architecture": {
|
||
"pipeline": "sector_snapshots → market_scanner.scan_hot_sectors() → 腾讯行情 → 过滤(涨>3%+有量) → 评分 → candidates 表 → XMPP 推送(高分)",
|
||
"scoring": "score = min(10, round(3 + change% * 0.5 + (amount/1e8) * 0.1))"
|
||
},
|
||
"constraints": [
|
||
"纯数据驱动,不调 LLM(区别于旧 xiaoguo_scanner 和 market_screener)",
|
||
"只扫描 A 股(6 位代码以 5/6/9 开头)",
|
||
"板块涨幅 >2% 才纳入热门板块",
|
||
"个股涨幅 >3% 才进入候选",
|
||
"高分候选(score>=6)推送到 XMPP(知微 bot :5805)"
|
||
],
|
||
"must_not": [
|
||
"不要调小果 LLM API(node122:18003)",
|
||
"不要写 candidate_pool.json(旧格式,已废弃)"
|
||
],
|
||
"related_files": [
|
||
"scripts/market_scanner.py — 选股脚本",
|
||
"server.py — /api/candidates",
|
||
"mofin_db.py — candidates 表",
|
||
"market_watch.py — 板块数据源"
|
||
]
|
||
}
|
||
}
|