Bob-Bo1/dsh-stock-watch

Plugin插件 Native原生 ⭐ 3 MIT Data & Analysis数据与分析UI & Themes界面与主题

DeepSeek Harness (DSH) 本地A股投资组合跟踪插件。读取本地 holdings.json 文件,并在侧边栏显示报价和盈亏。

Project Overview项目介绍

Bob-Bo1/dsh-stock-watch is a native plugin built exclusively for DeepSeek Harness (DSH). It adds a quick access entry at the bottom of DSH’s left sidebar to let users check real-time quotes for A-share holdings and watchlist stocks. To install the plugin from GitHub, you run the command dsh plugin --profile web add github:Bob-Bo1/dsh-stock-watch, then confirm the plugin is registered in your DSH Web profile’s cordis.patch.yml file, and finally restart your DSH Web service to activate it. For local development, you can clone the repository to your local machine and add it via the dsh plugin --profile web add link:<local-directory-path> command. You can also set an environment variable to customize the path to your holdings file.

After installation, you can manage your holdings and watchlist directly through the plugin’s web panel, or you can manually edit the local JSON configuration file. The holdings page calculates and displays your profit and loss for each position, while the watchlist page only shows current price, daily change and change percentage for your tracked stocks. Quotes are refreshed every 5 seconds by default, but you can adjust the refresh interval in the configuration file to fit your needs. When you open the plugin or switch between pages, it automatically reloads your data and refreshes quotes immediately. This plugin is designed for individual investors who follow A-shares and want to check their holdings right inside DSH.

This plugin is released under the open-source MIT license, and all your personal holding data is stored only on your local machine. No personal data is uploaded to the plugin author’s server, and only stock codes are sent to Tencent’s public quote API to fetch real-time price data. The current version does not account for trading fees, stamp duty, dividends or financing costs, so it is for personal observation only, does not constitute investment advice, and cannot execute buy or sell orders. The repository already ignores holdings.json via .gitignore to help prevent accidental commits. Users should remember not to commit their real holdings file to GitHub and avoid exposing DSH to the public network to prevent data leaks.

dsh-stock-watch 是专为 DeepSeek Harness(DSH)开发的原生插件,用于在 DSH 左侧边栏添加入口,方便用户查看A股持仓和自选股的实时行情。该插件可通过 dsh plugin 命令直接从 GitHub 安装,也支持本地开发时通过链接本地目录的方式安装。安装后需要确认 cordis.patch.yml 中完成插件注册,再重启 DSH Web 即可启用,插件持仓数据默认存放在 DSH 工作区根目录,也支持通过环境变量自定义文件路径。

用户安装完成后,既可以直接在插件网页面板添加、编辑、删除持仓和自选股,也可以手动编辑 JSON 文件配置股票信息。持仓页会显示持仓盈亏,自选页仅展示实时行情,盈亏按照“现价减成本价”乘以持仓数量计算,行情默认每5秒刷新一次,也支持用户在配置文件中自定义刷新间隔。该插件面向关注A股行情、希望在 DSH 中随时查看持仓收益变化的个人投资者使用。

该插件遵循 MIT 许可证开源,所有持仓数据都仅存储在用户本地,不会上传到作者服务器,行情请求仅发送股票代码到腾讯公开接口,保障用户数据隐私。当前版本未计入手续费、印花税、分红和融资成本,仅供个人查看行情使用,不构成投资建议,也无法执行买卖操作。用户需要注意不要将真实持仓文件提交到 GitHub,也不要将 DSH 暴露到公网,避免数据泄露。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:Bob-Bo1/dsh-stock-watch

把 Bob-Bo1/dsh-stock-watch 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

stock-watch:DSH 股票观察站

一个面向 DeepSeek Harness(DSH)的客户端插件。它在 DSH 左侧边栏底部提供一个 📈 入口,用来查看 A 股持仓和自选股的实时行情。持仓页显示盈亏,自选页只显示行情。

先看安全说明

  • 持仓数据只从你自己电脑上的一个 JSON 文件读取。
  • 插件只把本机配置中的股票信息传给当前 DSH 页面,不会上传到本项目作者的服务器。
  • 行情请求发送到腾讯行情接口时只包含股票代码,不包含你的数量、成本价或 API Key。
  • 仓库里的 holdings.example.json 只有假数据。请不要把真实的 holdings.json、截图、账号信息或 API Key 提交到 GitHub。
  • 默认情况下,DSH Web 服务只监听本机地址。如果你主动把 DSH 暴露到局域网或公网,能访问 DSH 的人也可能读取这个本地插件路由返回的持仓摘要,请不要这样配置。
  • 插件只保留允许的字段:持仓使用 code、name、quantity、costPrice,自选使用 code、name。其他字段会被丢弃。

安装

从 GitHub 安装

dsh plugin --profile web add github:Bob-Bo1/dsh-stock-watch

然后在 DSH Web profile 的 cordis.patch.yml 中确认有这段注册配置:

- insert:
    - id: stock-watch
      name: stock-watch

重启 DSH Web:

dsh web

如果你使用的是 dsh.cmd,把上面的 dsh 换成 dsh.cmd 即可。

本地开发安装

git clone https://github.com/Bob-Bo1/dsh-stock-watch.git D:\Tools\stock-watch
dsh plugin --profile web add link:D:\Tools\stock-watch

本地路径可以替换成你实际保存插件的目录。安装后同样需要确认 cordis.patch.yml 已注册插件,再重启 DSH。

关联自己的股票数据

安装并重启 DSH 后,直接打开左下角的 📈 按钮即可在网页里管理数据。

在网页里添加

面板底部有两个页面:

  • 持仓:添加股票名称或代码,再填写买入份数和买入价格。
  • 自选:添加股票名称或代码即可,不需要填写数量和价格。

点击面板底部的“+添加”,输入名称或代码后搜索。若有多个匹配结果,选择正确的一项,插件会把代码和名称写入本机的 holdings.json。股票名称会先在 Host 端解析为代码,浏览器不会直接修改文件。

点击底部的“修改”后,选择一只股票即可编辑。持仓可以修改股票名称、买入份数和买入价格;自选可以修改股票名称。编辑表单中也提供“删除这只股票”,删除前需要确认。持仓页和自选页分别管理自己的列表;删除持仓不会影响同一只股票在自选中的记录。打开股票插件、切换持仓/自选页面时,插件会立即重新读取数据并刷新行情,后台仍会按设置的间隔继续更新。

网页添加失败时,可以继续使用下面的 JSON 文件方式。

推荐把持仓文件放在 DSH workspace 根目录:

你的 DSH workspace\holdings.json

最简单的做法:

  1. 复制仓库里的 holdings.example.json。
  2. 将副本改名为 holdings.json。
  3. 把示例股票替换成自己的数据。
  4. 将文件放到 DSH workspace 根目录。
  5. 打开 DSH 左下角的 📈 按钮查看结果。

DSH workspace 通常就是启动 dsh web 时所在的目录。你也可以用环境变量指定一个本机文件:

$env:DSH_STOCK_HOLDINGS = 'D:\Private\stocks\holdings.json'
dsh web

相对路径会按 DSH workspace 解析。环境变量优先级高于默认的 workspace\holdings.json。

如果你希望无论从哪个目录启动 DSH 都使用同一个文件,可以在 Windows 用户环境变量中固定路径:

[Environment]::SetEnvironmentVariable('DSH_STOCK_HOLDINGS', 'D:\你的固定目录\holdings.json', 'User')

设置后请完全重启 DSH Web。这个环境变量只保存文件路径,不会把持仓内容上传到 GitHub。

文件格式

{
  "refreshSeconds": 5,
  "holdings": [
    {
      "code": "sz000001",
      "name": "示例股票",
      "quantity": 100,
      "costPrice": 10.5
    }
  ],
  "watchlist": [
    {
      "code": "sh600028",
      "name": "示例自选"
    }
  ]
}

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-token-price 下一个 Next dsh-lookseek →