Live remaining balance for the current API key from Sub2API, New API, or official DeepSeek, plus actual spend when the site publishes it, not a local token estimate.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:MuAllen/dsh-gateway-wallet
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
DeepSeek Harness 侧边栏左下角的「站点余额」:点开后显示当前路由在站点账本上的剩余额度和今日实扣,覆盖国内中转(Sub2API / New API)和 DeepSeek 官方,不是本地 token × 单价的估算。
和 TokenLedger(用量账本)是互补关系:用量账本记的是本机会话里的 token;本插件读的是站点给这把 key 的余额。
显示内容(站点有返回才出现对应行):
- 当前路由、令牌名、脱敏 Key(
sk-••••xxxx);配了多条路由时可切换查看 - 余额、今日实扣、累计已用
- 今日 / 累计 token 桶与请求数
- 套餐名、RPM / TPM
- 余额低于 $1 / ¥5 时,侧边栏按钮打点(侧栏收起时仍能看见)
完整 API Key 只在本机 Host 进程里用作 Authorization 头,不会进入浏览器,也不会发到本插件作者的任何服务器。
截图
侧边栏入口,金额跟随当前选中的账户:

点开后的站点账本(上半:账户与金额):

同一面板下滑(下半:用量、速率、读取来源):

安装
需要 DeepSeek Harness 的 web profile。
dsh plugin --profile web add github:MuAllen/dsh-gateway-wallet
重启已经在跑的 DSH,浏览器硬刷新。侧边栏底部会出现「站点余额」。
升级或卸载:
dsh plugin --profile web update dsh-gateway-wallet
dsh plugin --profile web remove dsh-gateway-wallet
支持的账本
| 站点程序 | 接口 | 说明 |
|---|---|---|
| Sub2API(如部分国内中转) | GET /v1/usage |
余额、今日/累计实扣、token 桶 |
| New API / One API 等分支 | GET /api/usage/token/ |
额度、已用;今日仅日志完整返回时显示。key 额度不限时余额显示为未公布,令牌栏单独标明这把 key 不限 |
| DeepSeek 官方 | GET /user/balance |
仅 api.deepseek.com:余额;没有今日实扣 |
只使用你已经配给这条路由的普通 API key。打开账本前会用不带密钥的 404/401 探测认出是 Sub2API 还是 New API;对不上的站点会说明原因,不会按另一套程序换算额度。
免责声明
- 本插件是独立的第三方社区项目,与 DeepSeek、各中转站均无隶属、赞助或背书关系。「DeepSeek」及相关商标归其权利人所有。
- 面板上的金额以站点当时返回为准,不是对账单或税务凭证。接口变更、站点口径或网络失败都可能导致空白或与控制台不一致。
- 本软件按 MIT 许可证「按现状」提供,作者不对使用本插件造成的损失承担责任。
侧边栏按钮的交互参考了 TokenLedger 的 sidebar.footer.action 用法。
License
Links
More in this category
bowenliang123/dsh-context★ 1969
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
Han-1413141/dsh-cost-meter★ 388
Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
wssfk12138/dsh-damage-pulse★ 257
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 202
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 171
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
PolinniZhong/dsh-personal-center★ 118
Personal center for DeepSeek Harness: cross-session usage statistics, per-model cost estimation, global custom instructions, a global font-size adjuster, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.