知行多空线指标接入选股与事件回测;大盘总览走 quicksync 统一入口;candles 批量 upsert 分批防 asyncpg 参数超限
This commit is contained in:
@@ -60,10 +60,10 @@ def _d(v) -> str | None:
|
||||
def _get_pro():
|
||||
if not settings.tushare_token:
|
||||
raise MarketOverviewError("未配置 TUSHARE_TOKEN,无法获取大盘行情(backend/.env)")
|
||||
import tushare as ts
|
||||
# 走统一入口:15000 积分档 token 只认 quicksync 镜像(直连 api.tushare.pro 会 40101)
|
||||
from .tushare_provider import get_pro
|
||||
|
||||
ts.set_token(settings.tushare_token)
|
||||
return ts.pro_api()
|
||||
return get_pro()
|
||||
|
||||
|
||||
def _fetch_index_sync(pro, ts_code: str) -> pd.DataFrame:
|
||||
|
||||
Reference in New Issue
Block a user