kentleenot/dsh-trading-toolkit
面向DeepSeek Harness代理的A股+美股交易工具包:行情报价、K线、ADX趋势信号、回测预览。设计上只读。
Project Overview项目介绍
dsh-trading-toolkit is a read-only A-share and US stock trading plugin for DeepSeek Harness. It offers real-time quotes via Eastmoney (no API key), historical OHLCV klines, ADX-based three-state regime classification (trend/oscillating/noise), and a simple long/short backtest preview. Use it for market lookup, regime analysis, and educational strategy checks. Caveat: the backtester is educational, not production-grade, and the plugin never places orders or touches trading credentials.
dsh-trading-toolkit 是面向 DeepSeek Harness 的 A股+美股只读交易工具插件,提供实时行情查询(东方财富数据源,免 Key)、历史 K 线、ADX 三状态市场分类(趋势/震荡/噪声)及简易多空回测预览。适用于行情查看、市场状态判断与策略教学验证。注意:回测为教育用途,非生产级,且插件永不下单、不接触交易凭据。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-trading-toolkit(kentleenot/dsh-trading-toolkit)
仓库:https://github.com/kentleenot/dsh-trading-toolkit
本站详情页:https://www.yhbd.top/plugins/kentleenot-dsh-trading-toolkit/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 MIT · ⭐ 2 · 最近提交 2026-08-29 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【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 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
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:kentleenot/dsh-trading-toolkit
把 kentleenot/dsh-trading-toolkit 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-trading-toolkit
A-share + US stock trading toolkit for DeepSeek Harness agents: 行情查询(A股+美股)、ADX 三状态信号、简易回测预览。只读设计——永不下单、不触碰任何交易凭据。
Tools
| 工具 | 说明 |
|---|---|
market_quote |
股票实时行情,自动识别 A股/美股:6位代码(600519)、前缀代码(sh600519)、中文名(贵州茅台)、美股 ticker(AAPL/NVDA)、指数(上证指数/深证成指/创业板指/科创50/沪深300)。数据源:东方财富,国内直连免 Key |
kline_history |
历史 OHLCV K线:A股/美股,周期 1m/5m/15m/30m/60m/1d/1w/1M,复权 0/1/2,最多 1000 根,输出可直接喂给 regime_signal |
regime_signal |
ADX 三状态市场分类:trend(趋势)/ oscillating(震荡)/ noise(噪声),含多空方向与 200-EMA 偏向。纯计算 |
backtest_run |
基于跨状态规则的简易多空回测(总收益/最大回撤/胜率/交易次数)。教育用途预览,非生产级回测 |
安装
dsh plugin --profile web add github:kentleenot/dsh-trading-toolkit
(web 是 profile 名,可替换为你自己的 profile;该命令会在指定 profile 中安装本插件。)
然后将插件加入你的 DeepSeek Harness 组合配置(参见 harness 第三方插件文档)。
用法示例(agent 可调用)
market_quote(symbol: "600519") # A股:贵州茅台
market_quote(symbol: "贵州茅台") # A股:中文名搜索
market_quote(symbol: "000001") # A股:上证指数
market_quote(symbol: "AAPL") # 美股:苹果
market_quote(symbol: "NVDA") # 美股:英伟达(未知 ticker 自动探测市场)
market_quote(symbol: "US:AAPL") # 强制美股
market_quote(symbol: "CN:600519") # 强制 A股
kline_history(symbol: "600519", period: "1d", limit: 120) # 贵州茅台日K
kline_history(symbol: "AAPL", period: "60m", limit: 48) # 苹果60分钟K
kline_history(symbol: "贵州茅台", period: "1w", limit: 30) # 中文名周K
regime_signal(candles: [[high, low, close], ...])
backtest_run(candles: [[high, low, close], ...], feePct: 0.05)
自动路由规则
- 6 位数字 /
sh|sz|bj前缀 / 中文名 → A股 - 纯字母 ticker(AAPL、NVDA、PLTR)→ 美股
US:/CN:前缀 → 强制指定市场- 常见美股 ticker(AAPL/MSFT/NVDA/TSLA/META/AMZN/GOOGL/HOOD/AMD/NFLX/BRK/JPM/KO/DIS/BA)走内置映射;未知 ticker 自动探测 NASDAQ/NYSE/AMEX
为什么做这个
本插件把作者实盘策略栈(PrinciplesV2 —— ADX 驱动的三状态自适应策略)以只读、教学形式开放。状态分类沿用生产环境相同的阈值:
trend:ADX >= 25,方向由 +DI/-DI 交叉决定,200-EMA 偏向覆盖oscillating:15 <= ADX < 25noise:ADX < 15
行情数据源用东方财富公开接口:国内直连、无需代理、无需 API Key、免费,同时覆盖沪深与美股。
开发
npm test # node --test test/
node test/smoke-market.mjs # 行情网络冒烟测试(A股+美股)
相关阅读
- 作者博客:libuyan.top —— 量化交易策略实盘复盘(PrinciplesV2)、AI 与能源交叉分析、独立开发记录
- 策略架构:PrinciplesV2 三状态自适应策略 设计笔记
License
MIT
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