提交
This commit is contained in:
@@ -139,12 +139,11 @@ def _to_date(v) -> date | None:
|
||||
|
||||
|
||||
def _to_code_suffix(code: str) -> str:
|
||||
"""6 位代码 → 交易所后缀(60/68 沪,00/30 深,4/8/92 北交所)。"""
|
||||
if code.startswith(("60", "68", "90")):
|
||||
return ".SH"
|
||||
if code.startswith(("00", "30", "20")):
|
||||
return ".SZ"
|
||||
return ".BJ"
|
||||
"""6 位代码 → 交易所后缀。委托 to_ts_code(含场内 ETF:51/56/58 沪、159 深)。"""
|
||||
from .data.symbols import to_ts_code
|
||||
|
||||
ts_code = to_ts_code(code)
|
||||
return ts_code[ts_code.index("."):]
|
||||
|
||||
|
||||
def _direction(op: str) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user