DSH Plugins Marketplace

DSH Plugins

Plugins

/

Tools & Capabilities

/

dsh-balance

E

dsh-balance

Manifest valid

One loopback GET request returns the DSH account wallet balance (recharge + bonus), the same figure as Settings → Account.

hasBundlePatch

dsh-balance

利用一条简单的 HTTP 接口,让 DSH 可以直接获取自己剩余的余额。返回的就是 设置 → 账号与余额 里那个 platform.deepseek.com 钱包(充值额度 + 赠送额度),不是 API key 余额,也不是上下文余量。

A single loopback HTTP request returns the DeepSeek Harness account balance — the same platform.deepseek.com wallet DSH shows under Settings → Account (recharge credit plus granted bonus).

安装

dsh plugin --profile web add github:EviMing/dsh-balance

装完刷新页面即可,无需重启。也可以从本地目录安装:

dsh plugin --profile web add D:\path\to\dsh-balance

用法

curl -s http://127.0.0.1:3080/api/balance
{
  "ok": true,
  "currency": "CNY",
  "recharge": 12.416959,
  "bonus": 0,
  "total": 12.416959,
  "fetchedAt": 1794049067812
}

只要数字:

curl -s "http://127.0.0.1:3080/api/balance?format=text"
# 12.416959 CNY

字段:recharge 充值余额、bonus 赠送额度、total 两者之和、fetchedAt 本次读取时间(毫秒时间戳)。

行为

  • 只接受 GET,其他方法返回 405。
  • 只允许 loopback:检查 req.socket.remoteAddress 和 Host 头,非本机请求返回 403,局域网里别的机器读不到。
  • 15 秒缓存 + single-flight:同一窗口内重复请求复用上一次读取,并发请求只打一次上游。
  • 不保存任何凭据:余额通过 DSH 自己的 deepseekAccount 服务读取,token 仍由 DSH 放在 ~/.dsh/.credentials.yaml 里管理,插件不碰。
  • 端口跟随你的 DSH Web 地址,默认 127.0.0.1:3080。

错误码

状态error含义
401signed-out当前 DSH 没有登录 DeepSeek 账号
403forbidden请求不是来自本机
405method-not-allowed不是 GET
502upstream-failed平台查询失败
503account-unavailable宿主没有挂载 deepseekAccount 服务

错误响应统一为 {"ok": false, "error": "...", "message": "..."}。

要求

  • DSH 0.2.0 及以上(使用 webServer.register 和 deepseekAccount.getBalance)。
  • 已在 DSH 里登录 DeepSeek 账号。

文件

  • index.js — 路由、缓存、loopback 校验、错误映射
  • cordis.patch.yml — bundle 插入点
  • locale/ — 市场卡片的中英文标题与描述
  • icon.svg — 市场图标

License

MIT

Comments

Loading…

Similar plugins

dsh-get-balance

by jsoncode

余额与费用查询插件,支持多账号查询,实时token实时统计,中英双语,界面交互直观、开箱即用

Manifest valid

★ 0

JavaScript

Sep 11, 2026

dsh plugin --profile web add dsh-get-balance

余额看板,可以添加多个按量计费/Token plan,同时查询余额。| Balance dashboard, allowing the addition of multiple pay-as-you-go/Token plans, while simultaneously checking balances.

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-balance-inquiry

DeepSeek account balance in the dsh web sidebar footer with live config hot reload and an editable Settings → Plugins card.

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 1

↓ 114/wk

MIT

JavaScript

dsh plugin --profile web add @choi-p/dsh-deepseek-balance

by hhy66

DSH 设置页插件:DeepSeek 账户余额与本机会话 token 消耗统计面板

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 0

MIT

JavaScript

Aug 25, 2026

dsh plugin --profile web add dsh-balance-stats

简便余额 — DeepSeek Harness 侧栏余额/时段价/今日用量小组件

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

dsh plugin --profile web add dsh-simple-balance

by boy1141

Shows the DeepSeek account balance and unused bonus credit in the session header, refreshing every 20 seconds and whenever the window regains focus.

Tools & CapabilitiesManifest valid

★ 0

MIT

JavaScript

Nov 7, 2026

dsh plugin --profile web add dsh-plugin-balance-chip