dsh-market-radar 0.1.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -36
- package/lib/client.js +218 -90
- package/lib/index.js +334 -95
- package/package.json +73 -22
package/README.md
CHANGED
|
@@ -1,75 +1,113 @@
|
|
|
1
1
|
# 行情雷达 · dsh-market-radar
|
|
2
2
|
|
|
3
|
-
在 DeepSeek Harness 桌面端查看黄金、A
|
|
3
|
+
在 DeepSeek Harness 桌面端查看黄金、A 股和美股行情。底部行情条最多固定 3 只自选,点开看板即可查看多周期走势、市场事件与经济数据、配置阈值提醒,或把行情快照写入对话草稿。
|
|
4
4
|
|
|
5
|
-
[English](#english) · [插件目录](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/data/plugins/alwayXXX__dsh-market-radar.yml) · [npm](https://www.npmjs.com/package/dsh-market-radar)
|
|
5
|
+
[English](#english) · [插件目录](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin/blob/main/data/plugins/alwayXXX__dsh-market-radar.yml) · [npm](https://www.npmjs.com/package/dsh-market-radar) · [GitHub Releases](https://github.com/alwayXXX/dsh-market-radar/releases)
|
|
6
|
+
|
|
7
|
+
## 功能概览
|
|
8
|
+
|
|
9
|
+
- **多市场自选与底栏常驻**:支持黄金(`XAU`、`AU9999`)、A 股与美股;底部行情条最多固定 3 只标的,底栏被占用时自动回退到右上角入口。
|
|
10
|
+
- **多周期价格走势**:提供 1 天、5 天、1 个月、半年、年初至今(YTD)、1 年、5 年与 Max 走势图,支持鼠标悬停和方向键读数。
|
|
11
|
+
- **市场事件与经济数据**:按市场展示官方发布的近期事件与美国非农就业、CPI 同比数据,并可按需调用 DSH 可用模型生成解读。
|
|
12
|
+
- **提醒与对话协作**:支持价格及涨跌幅方向提醒、全局快捷键一键隐藏并静音、JSON 配置导入导出,以及一键将行情快照写入对话草稿。
|
|
6
13
|
|
|
7
14
|
## 安装
|
|
8
15
|
|
|
9
|
-
|
|
16
|
+
宿主要求 **DSH `>=0.2.1-rc.1 <0.3.0-0`**、**Node.js `>=24.9.0`**。
|
|
10
17
|
|
|
11
|
-
|
|
18
|
+
- **桌面端安装**:在 DSH「插件」页直接搜索安装,或从 [GitHub Releases](https://github.com/alwayXXX/dsh-market-radar/releases) 下载适配当前宿主的 `.tgz` 后在「插件」页选择本地安装。
|
|
19
|
+
- **CLI 安装**:先完整退出 DSH(包括托盘),将下面示例中的安装目录替换为实际路径,执行后重新打开 DSH:
|
|
12
20
|
|
|
13
21
|
```powershell
|
|
14
22
|
& '你的安装目录\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop add 'dsh-market-radar'
|
|
15
23
|
```
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
安装本地包时,把 `dsh-market-radar` 替换为 `.tgz` 文件的绝对路径;指定版本时写 `dsh-market-radar@版本号`。
|
|
26
|
+
|
|
27
|
+
## 使用指南
|
|
28
|
+
|
|
29
|
+
1. **管理自选**
|
|
30
|
+
点击底部行情条(或右上角回退入口)打开看板,点 `+` 添加标的,点图钉固定到底栏,通过行尾 `···` 菜单调整顺序、进入提醒或移出自选(点击看板其他区域会自动收起行菜单)。
|
|
31
|
+
- **黄金**:`XAU`(美元/盎司)、`AU9999`(人民币/克)。
|
|
32
|
+
- **A 股**:支持输入 6 位代码检索交易所候选,也可直接输入带前缀代码(如 `sh600519`、`sz000001`、`sh000001`)。
|
|
33
|
+
- **美股**:支持个股与 ETF(如 `AAPL`、`VOO`)、带点股类(如 `BRK.B`)以及主要指数(`.INX`、`.DJI`、`.IXIC`、`.NDX`)。
|
|
34
|
+
|
|
35
|
+
2. **查看价格走势与报价时间**
|
|
36
|
+
点击任一自选进入详情页,可切换 1 天至 Max 区间。图表标明实际覆盖时间与数据粒度,缺失交易时段留空,被间隔分开的孤立数据点保留圆点标记。详情页与底栏悬浮提示按对应市场本地时区显示源站时间(美股为纽约时间,A 股与黄金为北京时间)。
|
|
18
37
|
|
|
19
|
-
|
|
38
|
+
3. **查看市场事件**
|
|
39
|
+
在标的详情图表下方展开「市场事件」(默认折叠,展开时按市场加载并独立缓存):
|
|
40
|
+
- **A 股**:显示国家统计局近期数据发布(CPI、PPI、PMI、GDP、工业与消费等)。
|
|
41
|
+
- **美股与黄金**:显示近期美联储货币政策公告,以及下一次美国 CPI 计划发布时间。
|
|
42
|
+
- 列表时间统一以北京时间显示。点击可预览的事件可按需调用 DSH 模型生成摘要、市场关注与潜在影响(A 股事件评估黄金与 A 股,美股事件评估黄金与美股);国家统计局正文不可读时仅保留官方原文入口。
|
|
20
43
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
3. **查看黄金市场事件。** 在 XAU 或 Au99.99 的图表下展开「市场事件」,查看近期美联储货币政策公告和下一次美国 CPI 计划发布时间。点击已发布公告,使用 DSH 可用模型生成摘要、市场关注以及对黄金和美股的潜在影响判断;预览中可打开官方原文。日期与时间采用北京时间。
|
|
24
|
-
4. **设置提醒。** 选择目标价或当日涨跌幅阈值。首条有效报价建立基线,之后报价从阈值外进入触发范围时,才会出现应用内提醒。默认冷却 15 分钟。涨跌幅填正数,例如「当日跌幅达到」填 `3`,表示跌至 −3% 或更低。
|
|
25
|
-
5. **把行情放入对话。** 打开一个可编辑的 DSH 对话,在标的详情中点「准备行情快照」,或在自选列表中点「准备重点自选快照」合并底栏固定的标的。预览后点「放入对话」。快照会加入当前草稿,已有文字与附件保留,由你决定何时发送。
|
|
26
|
-
6. **查看经济数据。** 在自选看板展开「经济数据」,查看美国非农就业月度变化和 CPI 同比。卡片显示最新月份、前值和最近八个月,点击来源可查看官方信息;数据可用时可以按需生成 AI 解读和潜在影响判断。
|
|
44
|
+
4. **查看经济数据**
|
|
45
|
+
在自选看板展开「经济数据」,查看美国非农就业月度变化(季调就业总量相邻月差)与美国 CPI 同比(未季调指数与去年同月对比,基期缺失时显示暂无)。两项指标按需拉取并各自独立缓存 4 小时,单项失败时重试仅重拉失败项,底部展示对应指标的北京时间获取时间(或区间)。数据有效时可按需生成 AI 解读。
|
|
27
46
|
|
|
28
|
-
|
|
47
|
+
5. **设置提醒**
|
|
48
|
+
支持「价格高于/低于」与「当日涨幅/跌幅/涨跌幅绝对值达到」五类条件;涨跌幅填正数(例如「当日跌幅达到」填 `3` 表示跌至 −3% 或更低)。首条有效报价建立基线,后续价格从阈值外穿越时触发应用内提醒,冷却时间可设 1–1440 分钟(默认 15 分钟)。从标的详情进入提醒页后,切换顶部「标的」下拉框会同步筛选下方规则列表。
|
|
29
49
|
|
|
30
|
-
|
|
50
|
+
6. **行情快照与设置**
|
|
51
|
+
打开可编辑的 DSH 对话后,可在详情页点「准备行情快照」,或在列表点「准备重点自选快照」(合并底栏固定的标的),预览后点「放入对话」加入草稿。已有文字与附件会保留,由你决定何时发送。在「设置」中可切换红涨绿跌 / 绿涨红跌配色,并导入或导出 JSON 自选配置。
|
|
31
52
|
|
|
32
|
-
|
|
53
|
+
### 隐藏与快捷键
|
|
33
54
|
|
|
34
|
-
|
|
55
|
+
DSH 获得焦点时,按 **Ctrl+Shift+F9**(Windows)或 **Command+Shift+F9**(macOS)可立即隐藏行情条与看板并静音提醒,再按一次恢复。可在 DSH 快捷键设置中搜索「行情雷达:隐藏或恢复」自定义组合键。提醒监测仅在 DSH 运行且设备保持唤醒时生效,恢复显示时不会补发隐藏期间的触发事件。
|
|
56
|
+
|
|
57
|
+
## 数据来源与机制
|
|
35
58
|
|
|
36
59
|
| 用途 | 来源 |
|
|
37
60
|
| --- | --- |
|
|
38
|
-
| A
|
|
39
|
-
|
|
|
61
|
+
| A 股、美股报价及当日分时;A 股五日分时和日线 | 腾讯财经(`qt.gtimg.cn`、`web.ifzq.gtimg.cn`) |
|
|
62
|
+
| 黄金报价、`XAU` 分时和日线 | 新浪财经(`hq.sinajs.cn`、`stock2.finance.sina.com.cn`) |
|
|
40
63
|
| 美股五日及日线 | Yahoo Finance(`query1.finance.yahoo.com`) |
|
|
41
|
-
| Au99.99 日线 | 上海黄金交易所(`www.sge.com.cn`) |
|
|
42
|
-
|
|
|
43
|
-
|
|
|
64
|
+
| `Au99.99` 日线 | 上海黄金交易所(`www.sge.com.cn`) |
|
|
65
|
+
| A 股市场事件 | 国家统计局数据发布 RSS(`www.stats.gov.cn`) |
|
|
66
|
+
| 美股及黄金市场事件 | 美联储(`www.federalreserve.gov`)、美国劳工统计局(`www.bls.gov`)、纽约联储(`www.newyorkfed.org`) |
|
|
67
|
+
| 经济数据 | 美国劳工统计局公开 API(`api.bls.gov`) |
|
|
44
68
|
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
49
|
-
- 请求由本机 DSH 宿主发出,无需为行情或事件单独配置账户或 API Key。数据服务方可能收到查询代码和网络地址。自选、提醒和显示设置保存在本机当前 profile。对话快照由用户添加,发送后按 DSH 的模型配置处理。
|
|
69
|
+
- **刷新与状态**:看板打开或有提醒规则启用时,行情通常每 15 秒刷新一次,其余时间每 60 秒刷新一次;过期报价不触发提醒。`XAU` 常规交易时段遵循纽约夏令时并包含每日美东 17:00–18:00 休市维护窗口;节假日或提前收市可能显示为「报价已延迟」。
|
|
70
|
+
- **走势数据**:`Au99.99` 当日走势使用插件运行期间的实时采样,其他标的在分时不可用时也可能回退采样。较长区间使用日线收盘点,Max 取决于数据源范围;A 股日线未复权,美股使用源站 `close` 字段。
|
|
71
|
+
- **市场事件与 AI 解读**:仅在点击生成时将对应官方原文或统计数据发送给 DSH 可用模型(优先官方 DeepSeek 路由首个模型,否则取首个可用路由模型),可能产生模型用量。CPI 日程优先读取美国劳工统计局,不可用时回退纽约联储或 24 小时内未过期的缓存日程,且只提供时间与关注点、不生成方向判断。AI 影响判断不含市场预期或实时行情,请自行核实原文。
|
|
72
|
+
- **本地与隐私**:行情、事件与经济数据均由本机 DSH 宿主直连官方/公开接口,无需单独配置账户或 API Key;外部接口会收到查询代码与本机网络地址。自选、提醒与显示设置保存在本机当前 profile,对话快照仅在你主动发送后按 DSH 模型配置处理。
|
|
50
73
|
|
|
51
74
|
## 卸载
|
|
52
75
|
|
|
53
|
-
在 DSH
|
|
76
|
+
在 DSH「插件」页直接卸载,或完整退出桌面端后用安装时的 CLI 执行:
|
|
77
|
+
|
|
78
|
+
```powershell
|
|
79
|
+
& '你的安装目录\resources\runtime\cli\bin\dsh.cmd' plugin --profile desktop remove 'dsh-market-radar'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
卸载前如需保留自选和提醒规则,可先在「设置」中导出 JSON 备份。
|
|
54
83
|
|
|
55
84
|
## 免责声明
|
|
56
85
|
|
|
57
|
-
|
|
86
|
+
本插件仅供个人查看行情与公开信息参考,不构成投资建议、交易建议或收益承诺。第三方行情与官方接口可能存在延迟、错误、中断或缺失,提醒也可能因网络、设备休眠、软件故障或数据源异常而延迟或未触发。请以交易所及相关官方机构信息为准,投资决策由使用者独立作出并自行承担风险。
|
|
58
87
|
|
|
59
|
-
[问题反馈](https://github.com/alwayXXX/dsh-market-radar/issues) · [MIT 许可证](https://github.com/alwayXXX/dsh-market-radar/blob/main/LICENSE)
|
|
88
|
+
[问题反馈](https://github.com/alwayXXX/dsh-market-radar/issues) · [MIT 许可证](https://github.com/alwayXXX/dsh-market-radar/blob/main/LICENSE)
|
|
60
89
|
|
|
61
90
|
## English
|
|
62
91
|
|
|
63
|
-
DSH Market Radar brings gold, China A-share and US quotes to the DeepSeek Harness desktop app. Pin up to three symbols to the bottom ticker, open charts from 1 day to Max,
|
|
92
|
+
DSH Market Radar brings gold, China A-share, and US market quotes to the DeepSeek Harness desktop app. Pin up to three symbols to the bottom ticker, open charts from 1 day to Max, review official market events and US macro indicators, configure price or percent-change alerts, and insert quote snapshots into an editable chat draft.
|
|
64
93
|
|
|
65
|
-
|
|
94
|
+
### Install & Uninstall
|
|
66
95
|
|
|
67
|
-
|
|
96
|
+
- **Requirements**: DSH `>=0.2.1-rc.1 <0.3.0-0` and Node.js `>=24.9.0`.
|
|
97
|
+
- **Install**: Search and install in the DSH Plugins page, select a `.tgz` from [GitHub Releases](https://github.com/alwayXXX/dsh-market-radar/releases), or quit DSH completely and install via the bundled CLI shown in the Chinese installation section above.
|
|
98
|
+
- **Uninstall**: Remove from the Plugins page, or quit DSH and run `plugin --profile desktop remove dsh-market-radar` with the same CLI. Export your JSON config from Settings first if you want a backup.
|
|
68
99
|
|
|
69
|
-
|
|
100
|
+
### Usage
|
|
70
101
|
|
|
71
|
-
**
|
|
102
|
+
- **Watchlist & symbols**: Open the panel from the bottom ticker (or the top-right fallback button). Use `+` to add gold (`XAU`, `AU9999`), A-shares (6-digit lookup or prefixed codes such as `sh600519`, `sz000001`), or US symbols including equities/ETFs (`AAPL`, `VOO`), dot share classes (`BRK.B`), and major indices (`.INX`, `.DJI`, `.IXIC`, `.NDX`).
|
|
103
|
+
- **Charts & timezones**: Inspect 1D through Max charts with pointer or arrow keys; missing sessions remain gapped and isolated points show explicit markers. Quote timestamps use local market time (New York time for US; Beijing time for A-shares and gold).
|
|
104
|
+
- **Market events**: Expand **市场事件** under a chart to load cached events per market (Beijing time): National Bureau of Statistics releases for A-shares; Federal Reserve policy announcements and the next scheduled US CPI release for US and gold.
|
|
105
|
+
- **Economic data**: Expand **经济数据** on the watchlist for BLS US nonfarm payroll changes (month-over-month revised seasonally adjusted levels) and year-over-year unadjusted CPI. Each indicator caches independently for 4 hours and retries independently on failure.
|
|
106
|
+
- **AI previews**: On demand, clicking a previewable event or available indicator sends the official text or data to an available DSH model (potentially incurring usage). A-share events assess gold and A-shares; US events assess gold and US stocks. Events without a reliable body keep only the official link.
|
|
107
|
+
- **Alerts, snapshots & shortcut**: Alerts baseline on the first valid quote and fire on subsequent crossings (1–1440 min cooldown). Press **Ctrl+Shift+F9** (Windows) or **Command+Shift+F9** (macOS) to hide the UI and mute alerts without replaying missed crossings on restore.
|
|
72
108
|
|
|
73
|
-
|
|
109
|
+
### Data, Privacy & Disclaimer
|
|
74
110
|
|
|
75
|
-
**
|
|
111
|
+
- **Sources**: Tencent Finance, Sina Finance, Yahoo Finance, Shanghai Gold Exchange, National Bureau of Statistics (RSS), Federal Reserve, US Bureau of Labor Statistics, and New York Fed.
|
|
112
|
+
- **Privacy**: Requests go directly from your local DSH host without extra API keys; providers receive requested symbols and your network address. Watchlists, alerts, and settings stay local to your DSH profile.
|
|
113
|
+
- **Disclaimer**: For personal informational reference only—not investment or trading advice. Quotes, AI judgments, and alerts may be delayed, inaccurate, or unavailable. Verify official sources and take responsibility for your own decisions.
|