feat: harden JP/KR suffix market support (#1817)

* feat: harden JP/KR suffix market support

* fix: define yfinance index quote metadata

* fix(review-feedback-1817): Handle JP 4-digit bare-code lookup in analysis paths

* fix(review-feedback-1817): Route 4-digit JP bases through API normalization

* fix(review-feedback-1817): 补齐外部 API/provider/运行时配置风险说明或证明该检测为误报
This commit is contained in:
zhulinsen
2026-06-27 22:10:08 +08:00
committed by GitHub
parent db5e32306e
commit ef9371003c
19 changed files with 425 additions and 84 deletions

View File

@@ -205,6 +205,11 @@ def _resolve_and_normalize_input(raw_value: str) -> str:
if is_code_like(text):
return resolve_index_stock_code_for_analysis(text)
if text.isdigit() and len(text) == 4:
resolved_index_code = resolve_index_stock_code_for_analysis(text)
if resolved_index_code != canonical_stock_code(text):
return resolved_index_code
if _is_obviously_invalid_analysis_input(text):
raise _invalid_analysis_input_error()