Back to home

hanjixin

dsh-finance-plugins

DSH Finance Plugin Suite - 金融场景插件套件

Stars
0
Language
TypeScript
Created
Aug 17, 2026
Updated
Aug 17, 2026

Introduction

DSH Finance Plugins

DSH 金融插件套件 - 为 DeepSeek Harness (DSH) Agent 框架开发的金融场景插件集合。

项目简介

本项目包含 19 个金融插件,覆盖股票行情、外汇汇率、风控评估、量化指标、加密货币、信用评分、ESG 分析、基金数据、宏观经济等多个金融场景。同时提供 DSH Market 展示前端,方便浏览和下载插件。

在线演示

🌐 DSH Market: https://7z47dqxz34.coze.site/

插件列表

插件npm 包名功能数据源
Market Data@hanjixin/dsh-tool-market-data美股实时行情新浪财经
A Stock@hanjixin/dsh-tool-a-stockA股实时行情腾讯财经
Forex@hanjixin/dsh-tool-forex外汇汇率查询与换算欧洲央行 (Frankfurter)
Quant Indicators@hanjixin/dsh-tool-quant-indicators量化技术指标 (MA/RSI/MACD)本地计算
Risk Engine@hanjixin/dsh-plugin-risk-engine风控规则引擎本地规则
Portfolio@hanjixin/dsh-tool-portfolio投资组合分析本地计算
Crypto@hanjixin/dsh-tool-crypto加密货币行情CoinGecko
Credit Scoring@hanjixin/dsh-tool-credit-scoring信用评分模型模拟数据
ESG@hanjixin/dsh-tool-esgESG 评级分析模拟数据
Financial Report@hanjixin/dsh-skill-financial-report财报/合同解析模拟数据
Market Sentiment@hanjixin/dsh-tool-market-sentiment市场舆情监控模拟数据
KYC Compliance@hanjixin/dsh-tool-kyc-complianceKYC/合规筛查模拟数据
Due Diligence@hanjixin/dsh-skill-due-diligence尽职调查报告模拟数据
Fund Analysis@hanjixin/dsh-tool-fund-analysis基金分析模拟数据
Fund Data@hanjixin/dsh-tool-fund-data基金净值数据天天基金
Macro Data@hanjixin/dsh-tool-macro-data宏观经济数据世界银行
Regulatory@hanjixin/dsh-tool-regulatory监管政策追踪模拟数据
Tax@hanjixin/dsh-tool-tax税务计算与筹划本地计算
Datasource Config@hanjixin/dsh-tool-datasource-config数据源配置管理-

快速开始

1. 安装 DSH

npm install -g @deepseek-ai/dsh

2. 配置 API Key

export DEEPSEEK_API_KEY="sk-your-api-key"
# 或写入配置文件
echo "DEEPSEEK_API_KEY=sk-your-api-key" > ~/.dsh/.env

3. 启动 DSH Web UI

dsh web --port 8080

4. 安装必要插件

cd ~/.dsh/profiles/web

# 图像识别
pnpm add @liustack/modlens -w

# @引用文件
pnpm add github:omdsh-dev/dsh-at-file -w

# 插件市场
pnpm add dshmarket -w

5. 安装金融插件

cd ~/.dsh/profiles/web

# 安装全部金融插件
pnpm add @hanjixin/dsh-tool-market-data @hanjixin/dsh-tool-a-stock @hanjixin/dsh-tool-forex @hanjixin/dsh-tool-quant-indicators @hanjixin/dsh-plugin-risk-engine @hanjixin/dsh-tool-portfolio @hanjixin/dsh-tool-crypto @hanjixin/dsh-tool-credit-scoring @hanjixin/dsh-tool-esg @hanjixin/dsh-skill-financial-report @hanjixin/dsh-tool-market-sentiment @hanjixin/dsh-tool-kyc-compliance @hanjixin/dsh-skill-due-diligence @hanjixin/dsh-tool-fund-analysis @hanjixin/dsh-tool-fund-data @hanjixin/dsh-tool-macro-data @hanjixin/dsh-tool-regulatory @hanjixin/dsh-tool-tax @hanjixin/dsh-tool-datasource-config -w

# 或按需安装单个插件
pnpm add @hanjixin/dsh-tool-market-data -w

6. 配置 cordis.patch.yml

编辑 ~/.dsh/profiles/web/cordis.patch.yml,添加插件加载配置:

- insert:
    - id: dsh-tool-market-data
      name: ./plugins/dsh-tool-market-data/src/index.js
    - id: dsh-tool-a-stock
      name: ./plugins/dsh-tool-a-stock/src/index.js
    - id: dsh-tool-forex
      name: ./plugins/dsh-tool-forex/src/index.js
    # ... 其他插件

7. 配置数据源(可选)

在 DSH 对话中配置收费数据源:

"配置 Tushare,token 是 your-tushare-token"
"查看我配置了哪些数据源"

数据源优先级:收费数据源(Tushare/Wind/Choice/聚宽)> 免费数据源

8. 验证安装

"查一下苹果公司的股票价格"
"把1000美元换算成人民币"
"计算这组数据的RSI指标:100,102,101,105,103"

项目结构

dsh-finance-plugins/
├── plugins/                          # DSH 金融插件(19个)
│   ├── dsh-tool-market-data/         # 美股行情
│   ├── dsh-tool-a-stock/             # A股行情
│   ├── dsh-tool-forex/               # 外汇汇率
│   ├── dsh-tool-quant-indicators/    # 量化指标
│   ├── dsh-plugin-risk-engine/       # 风控引擎
│   ├── dsh-tool-portfolio/           # 投资组合
│   ├── dsh-tool-crypto/              # 加密货币
│   ├── dsh-tool-credit-scoring/      # 信用评分
│   ├── dsh-tool-esg/                 # ESG分析
│   ├── dsh-skill-financial-report/   # 财报解析
│   ├── dsh-tool-market-sentiment/    # 市场舆情
│   ├── dsh-tool-kyc-compliance/      # KYC合规
│   ├── dsh-skill-due-diligence/      # 尽职调查
│   ├── dsh-tool-fund-analysis/       # 基金分析
│   ├── dsh-tool-fund-data/           # 基金净值
│   ├── dsh-tool-macro-data/          # 宏观经济
│   ├── dsh-tool-regulatory/          # 监管政策
│   ├── dsh-tool-tax/                 # 税务计算
│   └── dsh-tool-datasource-config/   # 数据源配置
├── src/                              # DSH Market 前端
│   ├── app/
│   │   ├── page.tsx                  # 主页
│   │   ├── layout.tsx                # 布局
│   │   └── api/download/             # 插件下载 API
│   └── lib/
│       └── plugin-data.ts            # 插件元数据
├── AGENTS.md                         # 项目说明
├── DESIGN.md                         # 设计规范
└── README.md                         # 本文件

DSH Market 前端

项目包含一个 DSH Market 展示前端,提供:

  • 插件卡片展示与分类筛选
  • 插件详情查看
  • 插件下载功能
  • 对话演示(模拟)
  • 安装指引

启动前端:

pnpm install
pnpm dev

访问 http://localhost:5000 查看。

数据源配置

免费数据源(已集成)

数据类型数据源说明
美股行情新浪财经实时行情
A股行情腾讯财经实时行情
外汇汇率欧洲央行200+货币
宏观经济世界银行全球数据
基金数据天天基金净值查询

收费数据源(可选配置)

数据源说明价格
Tushare Pro国内最全金融数据基础版免费
Wind 万得机构级数据联系销售
东方财富 ChoiceA股全市场¥2000/年起
聚宽 JoinQuant量化平台基础版免费

配置方式:在 DSH 对话中输入 "配置 Tushare,token 是 xxx"

插件开发规范

每个插件遵循 DSH Cordis 框架规范:

import { defineTool } from '@deepseek-ai/dsh-tools';

const name = 'plugin-name';
const inject = ['tools'];

function apply(ctx) {
  ctx.tools.register(defineTool({
    name: 'tool_name',
    description: '工具描述',
    parameters: { ... },
    output: {
      schema: { type: 'object', additionalProperties: true, properties: { ... } },
      render: (_args, value) => [{ type: 'text', text: JSON.stringify(value) }],
    },
    async execute(args) {
      // 实现逻辑
      return result;
    },
  }));
}

export { apply, inject, name };

技术栈

  • DSH: DeepSeek Harness Agent 框架
  • 前端: Next.js 16 + React 19 + TypeScript
  • UI: shadcn/ui + Tailwind CSS 4
  • 插件框架: Cordis

License

MIT