Preface¶
When using the DeepSeek Harness (DSH) local web panel, some users prefer to check their A-share holdings and watchlist quotes through a side entry point, rather than opening another browser tab.
Bob-Bo1/dsh-stock-watch is a DSH client plugin. It provides a stock entry at the bottom of the DSH left sidebar, allowing users to view real-time quotes for A-share holdings and watchlist stocks. The holdings page displays profit/loss, while the watchlist page only shows quotes. Data can be added directly from the webpage and saved to your local holdings.json.
Plugin Positioning¶
Bob-Bo1/dsh-stock-watch is maintained by Bob-Bo1 and is licensed under MIT.
It addresses the local A-share monitoring scenario: storing your holdings and watchlist data on your own computer and viewing quotes and profit/loss through the DSH web interface. Quotes come from Tencent’s public quote API; holdings data is only read from your local JSON file, and the plugin does not upload holdings content to the project author’s server.
This is an observational tool and does not constitute investment advice, nor does it execute buy or sell operations.
Core Features¶
- Provides a stock entry at the bottom of the DSH left sidebar.
- Displays real-time quotes for A-share holdings and watchlist stocks.
- The holdings page shows profit/loss, while the watchlist page only displays quotes.
- Supports searching, adding, modifying, and deleting holdings and watchlist stocks directly from the webpage.
- Supports writing stock data to the local
holdings.json. - Supports the environment variable
DSH_STOCK_HOLDINGSto specify the holdings file. - Quotes come from Tencent’s public quote API.
- Refreshes at a set interval when the page is visible and pauses requests when the page is hidden.
- Follows A-share conventions: red for gains, green for losses.
- Retains the last successfully retrieved data during network anomalies.
Installation and Activation¶
First, install the plugin from GitHub:
dsh plugin --profile web add github:Bob-Bo1/dsh-stock-watch
After installation, verify that the plugin registration entry exists in the cordis.patch.yml file within your DSH web profile:
- insert:
- id: stock-watch
name: stock-watch
The key point here is to confirm that id: stock-watch and name: stock-watch are present.
Once registration is confirmed, restart DSH Web:
dsh web
For local development installation, you can first clone the repository:
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
You can replace the local path with the actual directory where you saved the plugin. After local installation, follow the same steps: confirm the plugin is registered in cordis.patch.yml, then restart DSH Web.
Associating Local Stock Data¶
It is recommended to place the holdings file in the root of your DSH workspace:
Your DSH workspace\holdings.json
The simplest approach is:
- Copy
holdings.example.jsonfrom the repository. - Rename the copy to
holdings.json. - Replace it with your own data.
- Place it in the root of your DSH workspace.
- Open the stock entry at the bottom of the DSH left sidebar to view the results.
You can also use an environment variable to specify a local file:
$env:DSH_STOCK_HOLDINGS = 'D:\Private\stocks\holdings.json'; dsh web
This environment variable only stores the file path and takes priority over the default workspace\holdings.json.
Adding via Webpage and Field Requirements¶
The plugin supports searching, adding, modifying, and deleting holdings and watchlist stocks directly from the webpage. Data added through the webpage will be written to your local holdings.json.
Holdings and watchlist items use different fields:
- Holdings allowed fields:
code,name,quantity,costPrice. - Watchlist allowed fields:
code,name. - Other fields will be discarded.
Holdings field requirements:
codeis required and must follow the format:sh,sz, orbjfollowed by 5–6 digits.quantityis required and must be greater than 0.costPriceis required and must be greater than 0.
Watchlist field requirements:
- Each item only requires
codeand an optionalname.
Data and Calculation Scope¶
- The holdings page displays profit/loss.
- The watchlist page only shows quotes.
- Quotes come from Tencent’s public quote API.
- Retains the last successfully retrieved data during network anomalies.
- Follows A-share conventions: red for gains, green for losses.
- The current version does not account for transaction fees, stamp duty, dividends, or financing costs.
Applicable Scenarios and Notes¶
Suitable for users who need to view A-share holdings, watchlist quotes, and local profit/loss within their local DSH web panel. It is recommended to review the source code, license, and local file permissions before use.
Please note:
- Holdings data is read only from a JSON file on your own computer.
- The plugin only sends stock information from your local configuration to the current DSH page and does not upload it to the project author’s server.
- Requests sent to Tencent’s quote API include only stock codes, not your quantities, cost prices, or API Keys.
- By default, the DSH web service only listens on localhost.
- If exposed to a LAN or the public internet, anyone with access to DSH could potentially read the holdings summary returned by the local plugin routes.
- Do not commit real
holdings.jsonfiles, screenshots, account information, or API Keys to GitHub. - DSH plugins run with the permissions of the current DSH process; it is recommended to review the source code and permission implications before installation.
- Licensed under MIT.
Conclusion¶
Bob-Bo1/dsh-stock-watch is well-suited for local DSH web environments as a lightweight A-share holdings and watchlist monitoring entry. It reads your local holdings.json, fetches quotes via Tencent’s public quote API, and displays profit/loss on the holdings page.
- GitHub repository: https://github.com/Bob-Bo1/dsh-stock-watch
- Plugin directory listing (from plugin listings, not included in the captured materials): https://www.skillhub.cn/plugins/Bob-Bo1/dsh-stock-watch