51 lines
2.3 KiB
JSON
51 lines
2.3 KiB
JSON
{
|
||
"module": "signals",
|
||
"version": "1.0",
|
||
"purpose": "信号数据。提供市场信号查询,数据来自趋势检测(macro_context_collector/divergence_detector)和全市场扫描(market_scanner)。",
|
||
|
||
"human_help": {
|
||
"title": "信号与扫描",
|
||
"description": [
|
||
"展示系统产生的交易信号,包括趋势检测信号和全市场扫描候选股。",
|
||
"趋势信号来自 macro_context_collector(宏观)和 divergence_detector(背离检测)。",
|
||
"全市场扫描由 market_scanner.py 纯数据驱动(不依赖 LLM),每 15 分钟从热门板块筛选候选股。",
|
||
"所有信号存储在 signal_news 表中,候选股存储在 candidates 表中。"
|
||
],
|
||
"usage": [
|
||
"GET /api/signals — 获取最近 20 条信号(含趋势和扫描信号)",
|
||
"GET /api/candidates — 获取候选股池(最近 50 只,市场扫描产出)"
|
||
],
|
||
"troubleshooting": [
|
||
"信号为空 → 检查 macro_context_collector 和 market_scanner cron 状态",
|
||
"候选池为空 → 确认 sector_snapshots 有数据,market_scanner cron 在运行"
|
||
]
|
||
},
|
||
|
||
"ai_spec": {
|
||
"apis": [
|
||
{"method": "GET", "path": "/api/signals", "returns": "[{id, sector, overall_sentiment, summary, source, created_at, signal_type, severity}] — 最近 20 条信号"},
|
||
{"method": "GET", "path": "/api/candidates", "returns": "[{code, name, reason, score_2nd..score_5th, score_final, pass_s2..pass_s5, promoted, log, created_at}] — 候选股池(由 market_scanner 产出)"}
|
||
],
|
||
"dependencies": [
|
||
"mofin_db.py — signal_news / candidates 表",
|
||
"macro_context_collector.py — 宏观信号采集 cron",
|
||
"divergence_detector.py — 背离检测 cron",
|
||
"scripts/market_scanner.py — 全市场扫描 cron(*/15 9-15 1-5,纯数据驱动)"
|
||
],
|
||
"constraints": [
|
||
"signal_news 和 sector_signals 通过 LEFT JOIN 关联",
|
||
"candidates 表由 market_scanner 写入,纯数据驱动不调 LLM",
|
||
"旧 xiaoguo_scanner 已废弃,不再使用"
|
||
],
|
||
"must_not": [
|
||
"不要调小果 LLM API",
|
||
"不要依赖 xiaoguo_scan_tracker 表(已废弃)"
|
||
],
|
||
"related_files": [
|
||
"server.py — /api/signals, /api/candidates",
|
||
"scripts/market_scanner.py — 全市场扫描",
|
||
"macro_context_collector.py"
|
||
]
|
||
}
|
||
}
|