AnacondaKC/dsh-stock-market
有效解决了写代码的时候账户不能同时亏钱的BUG
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness (DSH), offering stock market data tools and a dedicated sidebar for querying China's Shanghai and Shenzhen A-share market information. It pulls data from multiple free public sources including Eastmoney, Tencent Finance, Sina Finance and Tonghuashun, and no API keys, licenses or user login credentials are required to use any of its features. It exposes 9 structured tools that DSH agents can call to access a wide range of stock market data, including quotes, charts, rankings and fundamentals, and it supports session-level persistence of tool toggle status.
The dedicated sidebar displays the latest price and daily change for major global indexes and commodities like Brent crude and gold. Users can scroll the sidebar content horizontally, drag it to reposition, adjust its width, or collapse it entirely, and all custom configuration is saved for the current active session. The main A-share index data refreshes automatically every 5 seconds, and the plugin compares the total market trading volume to the same period on the previous trading day. All up-to-date financial news content displayed in the plugin is sourced directly from Eastmoney.
All data sources included in this plugin are free and can be called without any stateful authentication, and the plugin does not store or read any user credentials for third-party services. It includes multiple security and stability measures, such as connection concurrency limits, maximum response size caps, and input validation to prevent oversized responses from being passed to the model context. To install the plugin, you first need to build it locally, then add it to DSH via the bundle command, and development requires setting the DSH workspace root path to set up the development environment. The project is open source under the permissive BSD-3-Clause license.
这是专为 DeepSeek Harness 开发的原生插件,提供沪深 A 股行情查询工具和专用侧边栏。插件整合了东方财富、腾讯财经、新浪财经、同花顺等多个免费公开数据源,无需用户配置 API 密钥、授权凭证或登录账号即可使用。它为 Agent 提供了 9 个结构化工具,可查询各类股票市场数据,同时支持工具开关状态的会话级持久化。
侧边栏顶部展示全球主要股指和布伦特原油、黄金等大宗商品的最新价格与涨跌幅,支持横向滚动、拖拽调整位置、修改宽度以及收起操作,配置状态会在当前会话中保存。A股大盘指数每 5 秒自动刷新一次,插件还会对比两市成交额与上一交易日的同期数据,最新财经资讯来自东方财富。
所有数据源均为可无状态调用的免费接口,插件本身不会存储或读取用户的第三方凭据,且对外部请求做了并发限制、输出大小限制等安全处理。安装需要先构建插件,再通过 DSH bundle 命令添加本地链接,开发时需要配置 DSH 工作区根路径完成环境搭建。项目采用 BSD-3-Clause 许可证开源。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-stock-market(AnacondaKC/dsh-stock-market)
仓库:https://github.com/AnacondaKC/dsh-stock-market
本站详情页:https://www.yhbd.top/plugins/anacondakc-dsh-stock-market/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 19 · 最近提交 2026-08-13 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- 19 stars - an early-stage project星标 19,属于早期项目
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:AnacondaKC/dsh-stock-market
把 AnacondaKC/dsh-stock-market 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-stock-market
DSH 的沪深 A 股行情侧栏和固定免费股票数据工具插件。
功能
- 右侧“行情”侧栏:顶部信息区展示上证指数、恒生指数、纳斯达克、韩国综合、日经指数、布伦特原油和纽约金主连的最新价与涨跌,支持横向滚动;侧栏支持收起、拖拽或键盘调整宽度及会话级状态保存。
- A 股行情快照:上证指数、深证成指、创业板指和科创综指来自腾讯实时行情,5 秒刷新;两市成交额与上一交易日同期比较,财经资讯来自东方财富。
- 数据接口设置:展示全部免费数据源和已接入的固定接口目录,无需配置凭据。
- 会话级股票工具开关:输入框工具行可启用或关闭全部股票工具,状态随会话日志持久化。
界面预览



接口目录
| 数据源 | 接口数 | 主要能力 |
|---|---|---|
| 东方财富 | 36 | 实时/批量行情、排行、K 线、分时、资金流、数据中心、F10、研报、资讯、搜索 |
| 腾讯财经 | 6 | 批量实时行情、K 线、分时、个股/板块排行、个股资讯 |
| 新浪财经 | 13 | 批量实时行情、K 线、市场/板块、资金流、滚动新闻及页面型数据 |
| 同花顺 | 2 | 日 K、分时走势 |
只保留无需许可证、API Key、Cookie 或登录状态即可调用的免费接口。不可无状态调用或已经停服的接口不接入插件。
DSH 工具
Agent 只看到以下 9 个按业务组织的工具,57 个数据源接口保留为插件内部适配器:
stock_quote:实时证券行情快照。stock_chart:K 线与分时走势。stock_ranking:个股、行业、概念和板块成分排行。stock_money_flow:个股、板块及沪深港通资金流。stock_fundamentals:公司、财务、股东、估值和经营指标。stock_events:公告、大宗交易、融资融券、龙虎榜和数据中心事件。stock_research:市场研报、个股研报、盈利预测和评级。stock_news:资讯流、个股新闻、搜索和股吧。stock_capabilities:查询工具动作、参数及数据源切换口径。
证券代码统一使用 600519.SH 或 000001.SZ,仅支持沪深 A 股。各工具只接受声明的 action 及对应业务参数,不接受底层 endpoint_id、URL、Host、代理地址或凭据。默认 source=auto:语义等价的接口可自动切换;排行、资金流和页面型资讯存在口径差异时,返回值会标记 degraded 并附警告。侧栏继续使用独立、稳定的内部 RPC 契约。
安全与稳定性
- 插件不读取或存储任何第三方行情凭据。
- 输入框开关关闭后,全部
stock_*工具会从该会话下一次模型请求的工具目录中移除;旧请求或伪造调用仍会被执行前策略和最终 guard 拒绝。 - 外部数据工具经 DSH 的统一执行策略处理。
- 所有公开网站请求使用固定 Host、参数白名单和固定 Referer;腾讯、新浪、同花顺的 GBK 数据只在服务端解码。
- 请求包含连接并发限制、文档建议的最小启动间隔、超时、有限退避重试、取消传播和 8 MiB 响应上限。
- JSON 数组、长文本、HTML 页面和最终工具 JSON 都有独立输出上限,避免把超大上游响应直接送入浏览器或模型上下文。
- 这些公开网站接口没有正式 SLA,可能随上游改版失效;商业或高频使用应采用正式授权数据源。
开发与发布
本插件的 DSH 依赖来自本地 DSH 工作区,不从公共 npm 获取。首次安装依赖后,设置 DSH_WORKSPACE_ROOT 并执行工作区链接:
npm ci --include=dev
DSH_WORKSPACE_ROOT=/absolute/path/to/dsh-workspace npm run setup:dsh-workspace
本仓库旁的 ../docs/test-AnacondaKC 是默认工作区路径。链接脚本不会替换已有的非链接依赖。
npm run typecheck
npm test
npm run build
npm run verify:package
npm run build 会先构建到同文件系统的暂存目录、验证产物和清单,然后以原子交换方式提升为 lib/;在不支持原子交换的平台上会使用可回滚的提升流程。prepack 会执行完整离线质量门禁并校验实际 .tgz 解包内容。
真实公开源烟测默认关闭,避免常规测试依赖网络:
DSH_STOCK_MARKET_LIVE_SMOKE=1 npm run test:live
东方财富固定目录的源文件位于 scripts/catalog-sources/eastmoney.py。修改后重新生成:
python3 scripts/generate-stock-api-catalog.py
调研文档新增的公开网站目录维护在 src/stock-api/researched-catalog.ts,不会被上述生成脚本覆盖。
安装
构建后通过 DSH bundle 安装:
dsh plugin --profile web add link:/absolute/path/to/dsh-stock-market
nocobase/nocobase
TencentCloudBase/CloudBase-AI-Toolkit
WYH66666666/DSH-Transparent-UI-Plugin
Nagi-ovo/dsh-visualize
SepineTam/mcp-for-stata
omdsh-dev/dsh-data-agent
morluto/jacobian
youdotcom-oss/agent-skills