完善知行短线
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user