From f8c946e8a9ad577c5dec49dd81089be0fe87827c Mon Sep 17 00:00:00 2001 From: fish Date: Sat, 4 Jul 2026 17:54:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=A4=E6=98=93=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 --- serve/frontend/src/components/Layout.tsx | 2 - serve/frontend/src/pages/Trading.tsx | 82 ------------------- .../src/pages/settings/MenuSettings.tsx | 1 - serve/frontend/src/router.tsx | 2 - 4 files changed, 87 deletions(-) delete mode 100644 serve/frontend/src/pages/Trading.tsx diff --git a/serve/frontend/src/components/Layout.tsx b/serve/frontend/src/components/Layout.tsx index 0fabaf6..e154944 100644 --- a/serve/frontend/src/components/Layout.tsx +++ b/serve/frontend/src/components/Layout.tsx @@ -30,7 +30,6 @@ import { Sparkles, Layers3, Landmark, - Cable, RadioTower, CheckCircle2, BookOpenCheck, @@ -54,7 +53,6 @@ const nav = [ { to: '/monitor', label: '监控中心', icon: RadioTower }, { to: '/review', label: '复盘', icon: BookOpenCheck }, { to: '/indices', label: '指数', icon: BarChart3 }, - { to: '/trading', label: '交易', icon: Cable }, { to: '/data', label: '数据', icon: Database }, ] as const diff --git a/serve/frontend/src/pages/Trading.tsx b/serve/frontend/src/pages/Trading.tsx deleted file mode 100644 index 9148ff1..0000000 --- a/serve/frontend/src/pages/Trading.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { Cable } from 'lucide-react' -import { PageHeader } from '@/components/PageHeader' -import { EmptyState } from '@/components/EmptyState' - -// 后续实现计划(本轮为占位): -// -// 一、信号 → 交易 的桥接 -// 监控通知产生的买卖信号(StrategyAlert),通过可插拔的输出通道分发到 -// 支持外部信号的交易软件。核心是在 alert_handler 层做多通道分发。 -// -// 二、支持的交易软件(按接入难度) -// 1. QMT / miniQMT(迅投)—— 个人 A 股实盘首选。 -// XtQuant 的 xttrader.order_stock() 下单,信号来源不限(文件/HTTP)。 -// 2. 掘金量化(MyQuant)—— 本地终端 + Python SDK,事件驱动接收信号。 -// 3. Ptrade(恒生)—— 内置策略引擎,外部信号经 API/文件喂入。 -// 4. vnpy(VeighNa)—— 开源框架,自写策略模块接收信号再调 Gateway 下单。 -// -// 三、信号输出通道(可插拔) -// alert_handler 分发: -// ├─ SSE → 前端通知(已有) -// ├─ 本地文件(JSON/CSV) → QMT 脚本轮询读取 ← 最简单,优先做 -// ├─ Webhook POST → 外部交易脚本 -// └─ 直连 xttrader(需本机装 QMT) -// -// 四、信号 → 交易指令 的字段补全 -// 现有 StrategyAlert(symbol/type/strategy_id/price)是「信号层」, -// 下单还需补:volume(数量,A股100的倍数)、price_type(市价/限价)、account。 -const PLAN: { title: string; desc: string }[] = [ - { - title: 'QMT / miniQMT', - desc: '个人 A 股实盘首选。XtQuant 的 xttrader 下单,信号经文件或 HTTP 喂入即可。国内个人量化实盘事实标准。', - }, - { - title: '掘金量化 (MyQuant)', - desc: '本地终端 + Python SDK,事件驱动接收外部信号下单,本土化程度高。', - }, - { - title: 'Ptrade (恒生)', - desc: '内置 Python 策略引擎,外部信号经 API/文件喂入,灵活性低于 QMT。', - }, - { - title: 'vnpy (VeighNa)', - desc: '开源交易框架,Gateway 丰富(期货/股票/加密货币),需自建执行端,搭建成本较高。', - }, - { - title: '信号输出通道', - desc: 'alert_handler 多通道分发:本地文件(最简,优先)、Webhook POST、直连 xttrader。与具体交易软件解耦。', - }, -] - -export function Trading() { - return ( -
- - -
-
- - -
-

后续实现规划

-
    - {PLAN.map((item) => ( -
  • - -
    -

    {item.title}

    -

    {item.desc}

    -
    -
  • - ))} -
-
-
-
-
- ) -} diff --git a/serve/frontend/src/pages/settings/MenuSettings.tsx b/serve/frontend/src/pages/settings/MenuSettings.tsx index 3697ba5..f713a7a 100644 --- a/serve/frontend/src/pages/settings/MenuSettings.tsx +++ b/serve/frontend/src/pages/settings/MenuSettings.tsx @@ -40,7 +40,6 @@ const BUILTIN_PAGES: NavEntry[] = [ { id: '/review', label: '复盘', type: 'builtin', visible: true }, { id: '/financials', label: '财务分析', type: 'builtin', visible: true }, { id: '/indices', label: '指数', type: 'builtin', visible: true }, - { id: '/trading', label: '交易', type: 'builtin', visible: true }, { id: '/monitor', label: '监控中心', type: 'builtin', visible: true }, { id: '/data', label: '数据', type: 'builtin', visible: true }, ] diff --git a/serve/frontend/src/router.tsx b/serve/frontend/src/router.tsx index abc41e8..fc383be 100644 --- a/serve/frontend/src/router.tsx +++ b/serve/frontend/src/router.tsx @@ -6,7 +6,6 @@ import { Onboarding } from './pages/Onboarding' import { Auth } from './pages/Auth' import { Data } from './pages/Data' import { Monitor } from './pages/Monitor' -import { Trading } from './pages/Trading' import { Dashboard } from './pages/Dashboard' import { AnalysisDetail } from './pages/AnalysisDetail' import { ConceptAnalysis } from './pages/ConceptAnalysis' @@ -72,7 +71,6 @@ export const router = createBrowserRouter([ { path: 'financials', element: }, { path: 'data', element: }, { path: 'monitor', element: }, - { path: 'trading', element: }, { path: 'limit-ladder', element: }, { path: 'indices', element: }, { path: 'branding', element: },