bsp_monitor: 支持全部20个币对 + 数据源切换至data_provider + Python 3.9兼容
- fetcher.py: 数据源从CCXT改为data_provider HTTP API,新增get_symbols()自动获取所有币对 - main.py: 重构为多币对架构,每个币对独立SymbolState(pivot_monitor/BSP去重/首轮抑制) - engine.py: format_bsp_detail()支持动态币对名 - ChanPivotMonitor/Classifier: 修复Python 3.9类型注解兼容(X|None → Optional[X]) - 首轮初始化时不推送中枢和BSP,避免启动时20条消息轰炸 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
b1cbdca707
commit
881c9d5eac
@@ -8,6 +8,7 @@ Feature 描述中枢内部结构,Label 记录中枢后实际演化。
|
||||
|
||||
import math
|
||||
import json
|
||||
from typing import Optional
|
||||
from ChanEnum import Chan_BI_DIR
|
||||
|
||||
|
||||
@@ -90,7 +91,7 @@ class ChanPivotClassifier:
|
||||
return duration_raw / avg
|
||||
|
||||
@staticmethod
|
||||
def compute_features(zs, historical_durations: list | None = None):
|
||||
def compute_features(zs, historical_durations: Optional[list] = None):
|
||||
"""计算单个中枢的全部结构特征(实时友好)"""
|
||||
duration_raw = ChanPivotClassifier.calc_duration(zs)
|
||||
contraction = ChanPivotClassifier.calc_contraction(zs)
|
||||
|
||||
Reference in New Issue
Block a user