Sessions & Messages

ashareapi-dsh-plugin

ashareapi/ashareapi-dsh-plugin · ★ 1

ashareapi

A股数据 API 官方 DeepSeek Harness 插件 —— 桌面端 / Web UI 输个包名即装,24 个 A股工具(行情 / K线 / 财务 / 资金 / 龙虎榜 / 板块 / 因子选股),免费工具无需 Key

License
MIT
Added
2026-10-30
Maintenance
active
Install kind
npm
npm
ashareapi-dsh-plugin
Manifest details
Manifest status
Declared
Manifest path
package.json#dsh
Manifest checked
2026-10-30T09:38:42.755Z
Lifecycle scripts
None found

Static manifest checks report declarations only; they are not compatibility or security review.

安装

dsh plugin --profile web add 'ashareapi-dsh-plugin@0.1.3'

从 npm 安装预构建包

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. ashareapi — Official DeepSeek Harness Plugin for the A-Share Data API
  2. What is this
  3. Why use it
  4. Install
  5. Desktop app / Web UI (recommended)
  6. Command line
  7. API key setup
  8. Tools
  9. Development
  10. Related
  11. Version
  12. License

ashareapi — Official DeepSeek Harness Plugin for the A-Share Data API

Let DeepSeek Harness (DSH) query China A-share data directly: quotes / candles / 5-level order book / financials / money flow / dragon-tiger list / sectors / convertible bonds / factor screening / macro / quant backtests — 31 tools, and the free tools need no key.

Works on the desktop app, the Web UI, and the command line — download the desktop app, open Plugins, and type a package name.

Node.js DeepSeek Harness npm License

Runs on the DeepSeek Harness desktop app and Web UI:

DeepSeek Harness desktop DeepSeek Harness Web UI

中文 · English

Website · Docs · Endpoint list · MCP · Agent Skill

Source · Issues · Changelog


What is this

An A-share data DeepSeek Harness plugin: once installed, asking DSH "what is 600667 trading at?" makes it call a tool and answer with real market data instead of guessing.

It works on the desktop app, the Web UI, and the command line — on the desktop app and the Web UI you just type a package name into Plugins; on the CLI it is one command.

Under the hood it connects to the MCP service at ashareapi.com (a single URL). The plugin's only job is to wire that service into DSH — transport, tool registration, and reconnection are all handled by DSH's own MCP client, so a DSH upgrade rarely requires a change here.


Why use it

  • Install by package name, from the desktop app or Web UI: no JSON to hand-edit, no script to run — restart and it is live
  • Free tools are genuinely key-free: ashare_quote / ashare_kline / ashare_hot / ashare_market_overview / ashare_changedist work right after installation, no key purchase needed
  • Automatic source failover: 70 data sources back each other up on the backend; if one has a problem it switches to the next, and your quota is not charged
  • Fixed conventions, no post-processing: K-lines are always forward-adjusted (qfq) (there is no adjust parameter), so there is no double-adjustment
  • No data ≠ failure: "the market genuinely has no data" (e.g. a suspended stock) is returned separately from "the fetch failed" — the agent will not mistake a suspension for an outage
  • Tool descriptions written for AI: every tool states when to use it / how to fill the parameters / what it returns, so the agent does not call it wrong
  • Thin by design: the plugin holds no data logic at all, just configuration — source failover / caching / health checks all live server-side, which makes failures easy to diagnose

Install

Download the DeepSeek Harness desktop app (macOS / Windows), open Plugins in the sidebar, and type the package name:

ashareapi-dsh-plugin

The Web UI (dsh web) has the same Plugins page. That's it — the tools are available in your next conversation. No command line, no config file.

Command line

npx @deepseek-ai/dsh web                                    # start the Web UI
npx @deepseek-ai/dsh plugin --profile web add ashareapi-dsh-plugin

(If you already have dsh installed globally, drop the npx @deepseek-ai/dsh prefix.)

Installing from the command line — and the Web UI's Plugins page — runs your local pnpm (DSH does not bundle it; the desktop app ships its own). If you don't have it: npm i -g pnpm.

Then restart dsh web. You can also confirm the layer is in place before starting:

npx @deepseek-ai/dsh --profile web --dump-config   # look for "# == ashareapi-dsh-plugin"

⚠️ The desktop app manages its own profile and cannot be installed from the command line — on desktop use the Plugins page above.

Then just ask:

You ask Tool used
What is 600667 trading at? ashare_quote
Pull the last 60 daily candles for 600667 ashare_kline
How is the market doing today? ashare_market_overview
What are people watching right now? ashare_hot
What is today's advance/decline distribution? ashare_changedist

Other ways to install (command line):

# From GitHub
npx @deepseek-ai/dsh plugin --profile web add github:ashareapi/ashareapi-dsh-plugin

# From a local directory (for development)
npx @deepseek-ai/dsh plugin --profile web add file:/absolute/path/to/ashareapi-dsh-plugin

This plugin is plain JavaScript with no build step, so a GitHub install works immediately — no allowBuilds approval needed in pnpm.

Uninstall:

npx @deepseek-ai/dsh plugin --profile web remove ashareapi-dsh-plugin

API key setup

The 5 free tools above work with no configuration at all.

To use the other 26 tools (order book / financials / money flow / dragon-tiger list / sectors / screening / macro / quant backtests …) you need a key: get one here (from ¥9.9 — all 31 tools unlocked).

Option 1: environment variable (simplest)

Add one line to ~/.dsh/.env (or wherever $DSH_HOME points):

ASHAREAPI_KEY=ct-your-key

Option 2: in the profile

Edit that profile's cordis.patch.yml — ~/.dsh/profiles/web/cordis.patch.yml for the Web UI / CLI, or ~/.dsh/profiles/desktop/cordis.patch.yml for the desktop app (its directory only appears after you open the desktop app once). Add an id-targeted override:

- id: mcp-ashareapi
  name: ashareapi-dsh-plugin
  config:
    apiKey: ct-your-key

⚠️ This patch replaces the entry's whole config, so only list the fields you want to change — everything else (endpoint, namespace) falls back to the plugin's built-in defaults.

Configurable fields

Field Default Meaning
apiKey reads ASHAREAPI_KEY Omit it to stay anonymous — only the 5 free tools work
url https://api.ashareapi.com/mcp Change this to go through your own proxy
serverName ashareapi Tool-name prefix, i.e. mcp__ashareapi__*; [A-Za-z0-9_-]{1,32}
headers {} Extra request headers, merged with the key above

Every other field (toolCallTimeoutMs, failOnStartupError, …) is passed through to DSH's own MCP client.


Tools

Registered tool names look like mcp__ashareapi__ashare_quote.

Free (no key)

ashare_quote live snapshot · ashare_kline candles · ashare_hot attention list · ashare_changedist market breadth · ashare_market_overview market overview

Requires a key

ashare_orderbook order book · ashare_snapshot full-field profile · ashare_finance financials · ashare_fund money flow · ashare_technical technical indicators · ashare_shareholder shareholders · ashare_events events · ashare_lhb dragon-tiger list · ashare_screen factor screening · ashare_sector sectors · ashare_sector_valuation sector valuation · ashare_macro macro · ashare_bond convertible bonds · ashare_etf ETFs · ashare_ipo IPOs · ashare_dividend dividends · ashare_dehydrated research digest · ashare_search symbol search · ashare_usage usage · ashare_minute intraday · ashare_kline_full full-history K-line · ashare_backtest quant backtest · ashare_backtest_batch batch backtest · ashare_strategies strategy list · ashare_factors factor library · ashare_playbooks playbook library

Field meanings, parameters, and response samples are in the docs.


Development

npm test   # regression guard for config assembly and typo hints

The plugin is a single index.js file with zero runtime dependencies: it hands configuration to DSH's own MCP client instead of reimplementing transport logic, so a DSH upgrade usually requires no change here.


Official SDKs: Python pip install ashareapi · Node.js / TypeScript npm install ashareapi

MCP server: https://api.ashareapi.com/mcp (configuration guide) — not on DSH? Claude Code / Codex / Cursor and 15+ other clients just need a URL

Agent Skill (an endpoint manual for AI agents): https://ashareapi.com/en/skill/


Version

See CHANGELOG.md for the latest version.


License

MIT