From e1116edb7b621651fb998ddf50e3d6c0ddbbe4c0 Mon Sep 17 00:00:00 2001 From: jackyu66git Date: Tue, 26 May 2026 14:49:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=8B=89=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp_monitor/fetcher.py | 1 + web/app.py | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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)