Skip to content

dsh-plugin-aportfolio

Verified

dsh-plugin-aportfolio · v0.1.0 · MIT

A-share watchlist and holdings for DeepSeek Harness: the agent remembers what you own and watch across sessions, prices it live, and reports per-position profit, weights and price-target hits.

Install

dsh plugin add dsh-plugin-aportfolio

Confirm the layer applied with dsh --profile default --dump-config — see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Tags

Readme

dsh-plugin-aportfolio

English | 中文

让 agent 跨会话记住你持有什么、在看什么——这样「我的持仓怎么样了」就不需要 每次重新把仓位告诉它一遍。

dsh plugin --profile web add dsh-plugin-aportfolio

自包含:自己从东方财富公开接口取价,不需要 token,也不依赖其他插件。只需要一个 存储后端,标准 profile 已经组装好了。

[!NOTE] 它的结果卡片依赖 presentationMeta 投影,而 run_code 内部分发的调用拿不到它。 纯 Code Mode 预设下答案不受影响,但卡片会退回通用卡片——见 工具呈现模式

工具

工具 作用
aportfolio_view 给每条记录取实时价:逐只盈亏与占比、组合总额,以及触及买卖目标的自选股
aportfolio_edit 记录或删除一条持仓/自选
持仓 2 只,市值 18.50万,盈亏 +1.00万(5.74%)
  600519 贵州茅台 100股  现价 1297.99  盈亏 +8.17%  占比 70.1%
  000001 平安银行 5000股  现价 11.05  盈亏 +0.45%  占比 29.9%

它坚持的四条

状态存在存储里,不在对话记录里。 需要从聊天历史里重读的仓位,迟早会被读错。

用户没说的,一律不存。 提示词要求模型「问,而不是猜」;set整条替换—— 要传完整的股数与成本,而不是增量,这样一句被误解的「又买了 100 股」不会悄悄让 持仓翻倍。

取不到价的持仓是「未知」,不是「不值钱」。 取价失败时这一行保留股数、去掉市值, 总额会说明排除了几只,摘要也会声明这个数字因此不完整。写成 0 会显得很权威,并且 把整个组合的总额拖下去。

到达条目上限时拒绝,而不是淘汰旧的。 被静默丢掉的持仓,是一个用户根本无从 察觉的错误组合。

配置

默认 含义
maxEntries 200 持仓与自选各自的条目上限
quoteConcurrency 6 取行情的并发数

许可

MIT