From 0b19869f9458d2580ba5f9b366b1e1bb8c512eeb Mon Sep 17 00:00:00 2001 From: xiaowu Date: Sat, 15 Aug 2026 10:43:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E7=BA=BF/=E5=A4=8D=E6=9D=83/?= =?UTF-8?q?=E6=AF=8F=E6=97=A5=E6=8C=87=E6=A0=87=E6=8E=A5=E5=8F=A3=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E6=99=AE=E9=80=9A=E7=89=88=EF=BC=88daily=5Fvip/adj=5F?= =?UTF-8?q?factor=5Fvip=20=E6=8E=A5=E5=8F=A3=E5=90=8D=E4=B8=8D=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=EF=BC=8Cdaily=5Fbasic=5Fvip=20=E6=97=A0=E6=9D=83?= =?UTF-8?q?=E9=99=90=EF=BC=9B=E6=99=AE=E9=80=9A=E7=89=885120=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E5=8F=AF=E7=94=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quantitative_data/importer.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/quantitative_data/importer.py b/quantitative_data/importer.py index 40770a0..6dfbd82 100644 --- a/quantitative_data/importer.py +++ b/quantitative_data/importer.py @@ -427,7 +427,7 @@ def import_daily_for_stock(ts_code: str, start_date: str, end_date: str, conn) - pro = get_ts_pro() def fetch(): - return pro.daily_vip( + return pro.daily( ts_code=ts_code, start_date=start_date.replace("-", ""), end_date=end_date.replace("-", ""), @@ -485,7 +485,7 @@ def import_daily_by_date( ): """ 按交易日批量导入日线行情 (高效模式) - 使用 pro.daily_vip(trade_date='YYYYMMDD') 一次性拉取全市场当日数据 + 使用 pro.daily(trade_date='YYYYMMDD') 一次性拉取全市场当日数据 大幅减少 API 调用次数: 约250交易日/年 × 16年 ≈ 4000次 (原来需要 5000股票 × 16年 = 80000次) 参数: @@ -576,7 +576,7 @@ def import_daily_by_date( td_str = td.strftime("%Y%m%d") if hasattr(td, "strftime") else str(td).replace("-", "") def fetch(): - return pro.daily_vip(trade_date=td_str) + return pro.daily(trade_date=td_str) df = fetch_with_retry(fetch, max_retries=3) if df is None or df.empty: @@ -679,7 +679,7 @@ def import_daily_basic( kwargs["trade_date"] = trade_date.replace("-", "") def fetch(): - return pro.daily_basic_vip(**kwargs) + return pro.daily_basic(**kwargs) df = fetch_with_retry(fetch, max_retries=2) if df is None or df.empty: @@ -745,7 +745,7 @@ def import_daily_basic_by_date( pro = get_ts_pro() def fetch_daily_basic(): - return pro.daily_basic_vip(trade_date=td) + return pro.daily_basic(trade_date=td) df = fetch_with_retry(fetch_daily_basic, max_retries=3) if df is not None and not df.empty: @@ -799,7 +799,7 @@ def import_adj_factor( kwargs["ts_code"] = ts_code def fetch(): - return pro.adj_factor_vip(**kwargs) + return pro.adj_factor(**kwargs) df = fetch_with_retry(fetch, max_retries=2) if df is None or df.empty: @@ -1635,7 +1635,7 @@ def resume_daily_by_date( td_compact = td_str.replace("-", "") def fetch(): - return pro.daily_vip(trade_date=td_compact) + return pro.daily(trade_date=td_compact) df = fetch_with_retry(fetch, max_retries=3) if df is None or df.empty: