diff --git a/bsp_monitor/fetcher.py b/bsp_monitor/fetcher.py index a1d066f..eca7922 100644 --- a/bsp_monitor/fetcher.py +++ b/bsp_monitor/fetcher.py @@ -11,6 +11,7 @@ import logging logger = logging.getLogger(__name__) PROVIDER_URL = "http://103.179.242.166" +PROVIDER_URL = "http://127.0.0.1" FETCH_LIMIT = 1000 _symbols_cache: Optional[List[str]] = None diff --git a/web/app.py b/web/app.py index 252e380..ab277e0 100644 --- a/web/app.py +++ b/web/app.py @@ -43,6 +43,10 @@ macd_signal_period = 9 * smooth_factor # 初始化交易所 exchange = ccxt.binance({ 'enableRateLimit': True, + 'proxies': { + 'http': 'http://127.0.0.1:7897', + 'https': 'http://127.0.0.1:7897', + }, }) # 初始化 A 股数据获取器(K 线优先请求 A-Share Data Platform,默认 http://103.179.242.166:8000 ,见 /api/v1/klines 文档;ASHARE_DP_URL 覆盖,置空则仅用 AKShare) @@ -595,8 +599,8 @@ def analyze_chan(df, symbol=None, timeframe=None): zs_list = chan.calculate_seg_zs(seg_list) # 计算笔中枢(BI中枢)并拍平成列表 - bi_zs_list = chan.cal_bi_zs_list_pure(bi_list) - #bi_zs_list = chan.cal_bi_zs(seg_list) + #bi_zs_list = chan.cal_bi_zs_list_pure(bi_list) + bi_zs_list = chan.cal_bi_zs(seg_list) bsp_list = [] if len(bi_zs_list) > 0: bsp_list = chan.find_all_bsp(bi_list, bi_zs_list)