In the plugin ecosystem of DeepSeek Harness (DSH), data processing needs for specific vertical domains usually require writing scripts or calling external APIs. The dsh-a-share-screener plugin addresses the data-source and screening-logic issues for A-share technical analysis in a DSH environment. It does not rely on paid market-data APIs; instead, it is built on free, token-free data sources (such as Sina, Eastmoney, and Tencent) and provides a set of composable atomic screening strategies.

Plugin Overview

The plugin is maintained by developer Gaines-cz and is open-sourced under the MIT License. It is integrated into DSH through the Cordis plugin adapter layer. Its core value lies in encapsulating complex A-share screening logic into reusable atomic filters, and supporting full-market scans and custom predicate composition.

Installation and Activation

Before installing, make sure the DeepSeek Harness CLI (dsh) is installed.

dsh plugin --profile myprofile add github:Gaines-cz/dsh-a-share-screener

The Git installation method pulls the source code, but the repository already contains prebuilt lib/ output files, so no build scripts need to run during installation. To pin a version, you can use github:Gaines-cz/dsh-a-share-screener#<sha>.

After enabling the plugin, start DSH with the following command:

dsh --profile myprofile

Core Features

The plugin provides three main tools, along with a set of built-in strategies and atomic filters.

1. Built-in Strategies and Atomic Filters

The plugin includes three quantitative screening strategies and fifteen atomic filters. All strategies are based on historical price and volume patterns and are for technical-analysis reference only; they do not constitute investment advice.

Built-in strategies:
* flat_base_low: Bottom + platform formation, with the stock price near the lower end of the recent price distribution and recent action forming a platform consolidation with converging moving averages.
* low_flat_breakout: Deep lows + volume breakout, supported by MA20 stabilizing downside, suitable for capturing volume-backed signals on the right side of a bottom.
* low_flat_limit_up: Historical lows + platform + ebb phase, combining deep pullbacks, platform consolidation, and cooldown characteristics after prior volume-backed limit-up moves.

Atomic filters:
Conditions such as deep_drawdown (deep drawdown), flat_base (platform consolidation), volume_limit_up (volume-backed limit-up), and industry_clearance (deep sector cleanup) are supported, allowing developers to compose these conditions through a JSON DSL.

2. Data Sources and Extensions

The plugin supports three free data sources:
* Sina (default): Provides forward-adjusted market data, with 1,023 candlesticks per request.
* Eastmoney: Provides backward-adjusted candlesticks and is the only data source that provides single-candlestick turnover amount (amount).
* Tencent: Serves as a backup source and provides backward-adjusted data.

All data sources are token-free. The plugin abstracts data-source capabilities through the DataSource interface, allowing developers to build custom data-source extensions on top of it.

3. Predicate Filtering and Caching

In addition to using preset strategies, the plugin supports custom predicate filtering. This allows developers to compose atomic filters using JSON expressions (with all, any, and not logic).

{ "all": ["deep_drawdown", { "any": ["platform_breakout", "volume_limit_up"] }] }

A full-market scan first downloads historical data to a local cache (located at $DSH_HOME/a-share-screener/<source-id>/); later scans reuse the cache. Cancellation is cooperative and should stop when the tool call is interrupted.

Typical Usage

In an Agent conversation in DSH, the above tools can be invoked directly.

List available screening strategies:

a_share_list_strategies

Screen using a built-in strategy:

Screen all A-shares with low_flat_limit_up, minDrawdownFromHigh 0.7.

Screen using a custom predicate:

使用自定义谓词 { "all": ["deep_drawdown", { "any": ["platform_breakout", "volume_limit_up"] }] } 进行筛选。

Technical Details and Dependencies

  • Required runtime: Requires Node.js version >= 20.3.0 and @deepseek-ai/cordis >= 4.0.0.
  • Price-limit thresholds: The plugin includes board-specific price-limit threshold logic: 10% for the Main Board, 20% for the ChiNext/STAR Market, and 30% for the BSE.
  • Price calculation: All price calculations are based on a chained daily-return index, avoiding distortions to technical patterns caused by ex-rights and dividends.
  • Error handling: If the currently active data source does not support a required capability, the scan aborts with an error instead of silently degrading.

Summary

dsh-a-share-screener provides standardized A-share quantitative screening capabilities for DeepSeek Harness. Through atomic design and free data sources, it lowers the barrier to financial technical analysis in Agent scenarios. Developers can build their own screening logic based on their needs by combining strategies or defining custom predicates.