Skip to content

[Bug] 北交所股票处理差异,异常 #1234

Description

@Clive1990

⚠️ 提交前必读 / Before You Submit

请确认已更新到最新版本后再提交 Issue,避免重复报告已修复的问题。
Please confirm you are on the latest version before filing, to avoid duplicate reports of already-fixed issues.

版本确认 / Version Check(必填 / Required)

  • 我已同步最新代码 / I am on the latest commit (Fork users: Sync fork first, then re-run Actions)
  • 代码版本 / Commit hash: build-20260505-141433Z
    • 本地 / Local: git rev-parse --short HEAD → ______
    • GitHub Actions: commit hash shown at the top of the workflow log → ______

问题描述 / Problem Description

针对北交所的代码,在前台和后台的处理中,都不支持添加后缀。前台虽然可以识别,但是像上海和深圳那样通过点击分析,会提示错误。使用API提交也存在相同的问题,会提示股票代码错误。另外,没有后缀也导致无法正确调用tushare的API,会使用旧版端口,然后提示无法判断,默认使用深市。

复现步骤 / Reproduction Steps

  1. 执行命令 / Run command '...'
  2. 配置 / Config '...'
  3. 查看 / View '...'
  4. 出现错误 / Error occurs

期望行为 / Expected Behavior

修正后缀处理问题,统一支持添加后缀,以更好支持tushare的API

实际行为 / Actual Behavior

错误日志 / Error Logs

Image Image

2026-05-09 16:35:54 | WARNING | data_provider/tushare_fetcher.py:769 | Tushare (旧版) 获取实时行情失败 920493: list index out of range

curl -X POST http://localhost:8000/api/v1/analysis/analyze
-H "Content-Type: application/json"
-d '{"stock_code": "920493.BJ", "async_mode": true}'
{"error":"validation_error","message":"请输入有效的股票代码或股票名称"}

环境信息 / Environment

  • 操作系统 / OS: [e.g. Ubuntu 22.04 / Windows 11 / macOS 14]
  • Python 版本 / Python version: [e.g. 3.11]
  • 运行方式 / Run mode: Docker
  • 相关配置 / Relevant config:
    • GEMINI_MODEL / AI model:
    • 数据源 / Data source:

其他信息 / Additional Context

添加任何其他有关问题的信息或截图。
Add any other context or screenshots about the problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions