Route business quotes and K-lines to CTP; keep Sina only for market chart page.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-02 15:14:13 +08:00
parent 98d63f38bf
commit 972ab5d08b
9 changed files with 52 additions and 101 deletions
+2 -9
View File
@@ -43,15 +43,8 @@ def _has_ths_token() -> bool:
def get_quote_source_label(*, ctp_connected: bool = False) -> str:
"""界面展示用行情源说明。"""
if ctp_connected:
return "CTP 柜台(已连接)"
source = _quote_source()
if source == "sina":
return "新浪(CTP 未连接时备用)"
if source == "ths":
return "同花顺 iFinD" if _has_ths_token() else "同花顺(未配置 token"
if _has_ths_token():
return "同花顺优先,失败回退新浪"
return "新浪(CTP 未连接时备用)"
return "CTP 柜台"
return "CTP 未连接"
def _sina_headers() -> dict: