Preface¶
When DeepSeek Harness’s agent handles questions about individual stock quotes, financial reports, analyst opinions, and news, it often falls back to web searches and shell commands, followed by page-by-page HTML scraping and parsing, if structured market data tools are not available. dsh-us-stocks is a plugin for DeepSeek Harness, maintained by Realyujie, built on yahoo-finance2 to provide a set of server-side agent tools for querying US stock quotes, price history, financial statements, analyst consensus, news, and ownership information.
What This Is¶
- Package name:
dsh-us-stocks - Repository path:
Realyujie/dsh-us-stocks - License: MIT
package.jsondeclared version:0.3.0- Dependency:
yahoo-finance2 ^4.0.2
It registers server-side agent tools. In the web profile, it also includes a browser-side component for drawing K-line charts corresponding to get_history; in TUI or headless profiles, the browser-side component is absent, but all tools remain available.
Core Tools¶
| Tool | Returns |
|---|---|
get_quote |
Latest price, change, day range, volume, market cap, P/E, EPS, book value, dividend yield, 52-week range, moving averages, recent and next earnings dates |
get_history |
Daily, weekly, monthly OHLCV data, including adjusted close prices, along with dividends and splits within the window |
get_financials |
Income statement, balance sheet, and cash flow statement items, queryable by quarter or year |
get_analyst_view |
Consensus rating, monthly buy/hold/sell counts, target prices, forward EPS and revenue estimates, recent analyst upgrades and downgrades, EPS beat/miss history |
get_news |
Recent news titles, including publisher, timestamp, and link |
get_ownership |
Insider and institutional ownership percentages, largest institutional and fund holders, insider buys and sells in the last six months |
Fund quote fields come with caveats regarding expense ratio accuracy, trailing yield methodology, and holdings coverage. These notes appear alongside the response fields to prevent misinterpreting aggregated fund-level metrics as individual company valuation data.
Installation and Enabling¶
Below are several installation methods. After installation, the profile needs to be restarted because the plugin is parsed when the startup tree is constructed.
Install via Harness¶
If the repository is accessible in the current environment, you can directly tell DeepSeek Harness:
Install this plugin: https://github.com/Realyujie/dsh-us-stocks
During installation, file system permissions may be requested because the profile directory is located outside the session workspace.
Manual Installation¶
If dsh is in PATH, you can run:
dsh plugin --profile web add dsh-us-stocks
If dsh is not in PATH, you can use npx:
npx @deepseek-ai/dsh plugin --profile web add dsh-us-stocks
Here, dsh plugin forwards to pnpm within the profile directory and keeps the profile’s dsh.profile.bundles list in sync, so manual plugin registration is not needed.
Updating the Plugin¶
For subsequent updates, you can run:
dsh plugin --profile web update dsh-us-stocks
Local Development¶
To point to a local checkout, you can use the link: path:
dsh plugin --profile web add link:/absolute/path/to/dsh-us-stocks
During local development, code changes typically require running a build process and restarting the profile to take effect.
Typical Usage¶
After installation, you can ask Harness to use these tools to query a specific ticker. For example, around a ticker, you can request:
get_quote: Get current quote and basic valuation fieldsget_history: Get daily, weekly, or monthly OHLCV dataget_financials: Get quarterly or annual financial statement itemsget_analyst_view: Get consensus rating, target prices, and recent adjustment recordsget_news: Get recent news titlesget_ownership: Get insider and institutional holdings
The repository also provides benchmark scripts. You can run:
npm run benchmark
Or specify another ticker:
npm run benchmark -- TTMI
Use Cases and Notes¶
This plugin is suitable for scenarios requiring structured US stock data queries within DeepSeek Harness, especially when you want to minimize web scraping, HTML parsing, and multiple shell calls.
Notes before and after use:
- The plugin runs within the current DSH permission context; review the source code, dependencies, and license before installation.
- Installation may request file system permissions for the profile directory, as it is located outside the session workspace.
- The plugin is released under the MIT license, with the version declared in
package.jsonas0.3.0. - In TUI or headless profiles, the browser-side component is absent, but tool calls remain available.
- Fund quote fields have limitations in methodology and coverage; use them with the caveats provided in the response.
Conclusion¶
The value of dsh-us-stocks lies in consolidating US stock quotes, financials, analyst opinions, news, and ownership queries into a set of clear agent tools, rather than letting the agent repeatedly explore through web pages and shell commands.
- GitHub: https://github.com/Realyujie/dsh-us-stocks
- Directory page lead (unverified independently): https://www.skillhub.cn/plugins/Realyujie/dsh-us-stocks