返回目录

dsh-ths-holdings

精选清单收录维护状态: 活跃

pm25000/dsh-ths-holdings

DSH 持仓盈亏悬浮卡片(同花顺投资账本)— 自动同步真实持仓数据,显示今日盈亏、上证指数和当日走势图,无需手动添加股票。

前往 GitHub
$ dsh plugin add dsh-ths-holdings

安装

dsh 没有统一的安装命令——把该插件 README 中的配置行加入你的 profile/patch 配置,然后重启即可。

了解安装方式

7

星标

0

Fork

TypeScript

语言

MIT

许可证

2026-08-15

创建于

2026-10-20

最近推送

README

dsh-ths-holdings

Awesome DSH Plugin npm version GitHub stars MIT npm version

English | 中文

A Tonghuashun holdings plugin providing a floating position P&L card and a portfolio report Skill for DeepSeek Harness (DSH) Desktop and Web. It automatically syncs your real portfolio data from the Tonghuashun investment-ledger (同花顺投资账本) — no manual stock picking. Displays 今日盈亏 (today's P&L), 上证指数 (Shanghai Composite Index), and an intraday mini chart, all in the A-share red-up/green-down convention.

Unlike watchlist tools, this plugin reads your actual positions and shows your real profit & loss — both as a percentage and as a yuan amount — updating every 20 seconds.

Screenshots

dsh-ths-holdings card

Version compatibility

Plugin 0.3.2 targets the DSH 0.2 series and has been tested with Desktop 0.2.0-rc.2, without a compatibility exemption. For DSH 0.1, keep plugin 0.2.0; this migration does not support the older host.

0.3.2 lets you enable the card and portfolio report Skill independently, sharing sign-in and portfolio selection. All card settings remain available; with only the Skill enabled, configure sign-in under Settings → Tonghuashun holdings. Fully quit and restart DSH after upgrading.

Installation

Desktop

  1. Open DSH Desktop and select Plugins in the sidebar.
  2. Select Add plugin and enter dsh-ths-holdings in the package field.
  3. Confirm that you trust the plugin as prompted, then select Install.
  4. When installation finishes, select Enable now. The floating card appears at the bottom-right corner. If a restart is requested, fully quit Desktop and reopen it.

Desktop does not currently update plugins automatically. To upgrade an installed version, uninstall it from the Plugins page, then install the new version. See the official DSH installation guide.

Web

Run in a terminal:

dsh plugin --profile web add dsh-ths-holdings

After installation, restart dsh web and refresh the DSH page. The floating card appears at the bottom-right corner.

Desktop and Web manage their plugins separately; use the installation method for the application you run.

Usage

The plugin details page provides two independent component switches:

  • Portfolio report Skill: holdings queries in ordinary chat and scheduled reports.
  • Tonghuashun holdings plugin (card component): the floating card with P&L and index data.

Both share the saved sign-in and portfolio selection. Enable either or both. All existing ⚙ card settings remain available. With only the Skill enabled, sign in and choose a portfolio under Settings → Tonghuashun holdings → Sign-in and portfolio.

Recommended — auto-acquire:

  1. Open DSH Desktop or Web and click ⚙ on the card.
  2. Click 🖥 自动获取 Cookie(推荐) — a system browser window opens (Edge / Chrome — the first installed one wins).
  3. Sign in to the Tonghuashun investment ledger in that window (QR code / account).
  4. When the sign-in succeeds the window closes itself, the Cookie is saved automatically, and the card refreshes with your portfolio.
  5. The plugin auto-discovers your portfolio — if you have several, pick one from the dropdown. Done.

Click 立即更新数据 in the expanded ⚙ settings to fetch P&L and the index immediately using the saved sign-in and selected portfolio. The button shows a loading state during the request; failures retain previous successful values and their original update time.

Open Settings → Tonghuashun holdings in DSH to change the refresh interval (default: 20000 ms, or 20 seconds) and card visibility. Click Save to apply changes immediately and retain them after restart. Hiding the card stops its automatic refresh without disabling the Skill. The Tonghuashun holdings plugin card component switch controls whether the card feature is loaded; chat queries and scheduled reports require the Portfolio report Skill component to be enabled.

Manual (backup):

  1. Open https://tzzb.10jqka.com.cn and log in.
  2. Click the browser's top-right menu → More tools → Developer tools (… in Edge, ⋮ in Chrome). F12 may have no effect on this page; open the tools through the browser menu.
  3. Keep developer tools open, select Network, then refresh the ledger page to record requests.
  4. Select a page or ledger API request to tzzb.10jqka.com.cn. Under Headers → Request Headers, copy the complete Cookie value. Copy only the name=value; name2=value2 portion, without the Cookie: prefix; do not copy a response's Set-Cookie header.
  5. Return to DSH Desktop or Web — click ⚙, paste the cookie into STOCK_PNL_COOKIE → save.
  6. The card validates the saved cookie immediately — it shows ✓ valid or ✗ invalid (with the reason/hint).

在 GitHub 阅读完整 README →

DSH Plugins 是独立的 DeepSeek Harness 插件目录,与 DeepSeek 官方无关,也不代表官方背书。第三方插件未经安全审计,安装前请审查源码。

每周获取最新的 DeepSeek Harness 插件,绝不滥发。