返回目录
模型与 MCP 插件

dsh-gold-price

eastbadman/dsh-gold-price

Draggable floating panel with live China gold quotes (SGE Au99.99 / Au T+D / 100g bar + London spot) for DeepSeek Harness

Stars
0
Forks
0
Issues
0
更新
20 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:eastbadman/dsh-gold-price

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-gold-price · 国内金价

English | 中文

一个 DeepSeek Harness(dsh)插件:在 dsh 页面里加一个可拖动的悬浮窗,实时显示国内黄金行情。

  • 沪金99.99(SGE Au99.99 现货)、黄金延期(Au T+D)、金条100g —— 元/克,涨跌按昨日结算价计算
  • 伦敦金现对照 —— 美元/盎司
  • 红涨绿跌(国内行情惯例),价格每次变动红/绿闪烁提示
  • 沪金99.99 近 30 分钟走势线(页面打开期间累积)
  • 20 秒自动刷新(页面隐藏时暂停,回到前台立即刷新)
  • 按住标题栏拖动,位置自动记忆(localStorage),可折叠成小条

安装

dsh plugin --profile <profile> add dsh-gold-price

或从 GitHub 安装:

dsh plugin --profile <profile> add https://github.com/eastbadman/dsh-gold-price

安装后无需重启(HMR 生效);若未出现,刷新一次页面。

工作原理

新浪行情接口要求新浪域 Referer 且不发送 CORS 头,浏览器直连不可行,因此:

  • Host 半(Node)按需抓取 hq.sinajs.cn 公开行情(带 Referer,15 秒缓存,无人在看时零后台请求),通过 webServer.register() 暴露同源路由 /gold-price/ticker.json
  • Client 半注册到 shell.overlay 插槽渲染悬浮窗,同源轮询,不产生任何跨域请求;样式全部使用 dsh 宿主主题 token

数据源与免责

行情来自新浪财经公开接口(上海黄金交易所 / 伦敦金现)。数据仅供参考,不构成任何投资建议;接口若调整,面板会显示获取失败并保留最后缓存。休市期间显示最后收盘价并标注行情时间。

License

MIT © eastbadman


English

A DeepSeek Harness (dsh) plugin: a draggable floating panel inside the dsh page with live China gold quotes.

  • SGE Au99.99, Au(T+D) and the 100g bar in CNY/gram (change vs. previous settlement)
  • London spot comparison in USD/oz
  • Red-up / green-down flashes on every move (CN market convention)
  • A ~30-minute sparkline of Au99.99 (accumulated while the page is open)
  • 20s auto refresh (pauses while the tab is hidden)
  • Drag by the header; position remembered in localStorage; collapsible
dsh plugin --profile <profile> add dsh-gold-price

The Sina quote endpoint requires a sina-domain Referer and sends no CORS headers, so the Host half fetches it from Node (15s cache, no background traffic when nobody is watching) and serves it through a same-origin webServer route; the Client half renders in the shell.overlay slot and never makes a cross-origin request. All styling uses host theme tokens.

Quotes come from Sina Finance's public endpoint (SGE / London spot). Indicative only — not investment advice.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类模型与 MCP
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。