完善知行短线

This commit is contained in:
2026-08-17 00:47:02 +08:00
parent 436a126e3b
commit 5029a22de1
12 changed files with 517 additions and 15 deletions

View File

@@ -57,13 +57,15 @@ def _call_retry(fn, *args, **kwargs):
def _get_pro():
"""token 检查 + 返回 pro api 客户端(同步对象,调用需 to_thread 包裹)。"""
"""token 检查 + 返回 pro api 客户端(同步对象,调用需 to_thread 包裹)。
经 tushare_provider.get_pro 统一走镜像补丁15000 积分档 token 只认 quicksync
"""
if not settings.tushare_token:
raise ScreenerError("未配置 TUSHARE_TOKEN无法同步全市场数据backend/.env")
import tushare as ts
from ..data.tushare_provider import get_pro
ts.set_token(settings.tushare_token)
return ts.pro_api()
return get_pro()
def _parse_d(s: str) -> datetime: