feat: 重构为三所价差异动监控系统

删除 HyperLiquid + 全部交易功能,构建自适应 surge 检测器。
- 新增 surge_detector.go: 每币独立滚动窗口基线,检测三所价差异常飙升
- 新增 SpreadCard/SurgeCard 前端组件
- 保留 momentum/trend/cumulative/trend_filter 扫描功能
- 更新文档和配置以反映新系统

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jackyu66git
2026-05-08 02:01:18 +08:00
co-authored by Claude Opus 4.6
parent 559d7bb870
commit d38782490c
36 changed files with 1201 additions and 6374 deletions
+19
View File
@@ -168,6 +168,25 @@ func (d *DB) migrate() error {
);
CREATE INDEX IF NOT EXISTS idx_trend_signals_coin ON trend_signals(coin);
CREATE INDEX IF NOT EXISTS idx_trend_signals_created ON trend_signals(created_at);
CREATE TABLE IF NOT EXISTS surge_events (
id INTEGER PRIMARY KEY AUTOINCREMENT,
coin TEXT NOT NULL,
timestamp DATETIME NOT NULL,
bn_price REAL,
okx_price REAL,
bg_price REAL,
spread_pct REAL NOT NULL,
baseline_pct REAL,
threshold_pct REAL,
ratio REAL,
direction TEXT NOT NULL,
leading_exchange TEXT NOT NULL,
mid_price REAL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX IF NOT EXISTS idx_surge_events_coin ON surge_events(coin);
CREATE INDEX IF NOT EXISTS idx_surge_events_created ON surge_events(created_at);
`
_, err := d.Exec(schema)
if err != nil {