@deepforce/dsh-balance
DeepSeek 账户余额查询插件,提供 /balance 命令行查询及 Web 界面输入框区域的用量显示。
AI 分析
核心用途是实时监控 DeepSeek 账户余额与会话 Token 消耗成本。适合需要严格控制 API 预算、关注调用成本的个人及企业用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:deepforce/dsh-balance说明文档
阅读完整 README ↗Configuration
| Field | Default | Meaning |
|---|---|---|
apiKeyEnv | DEEPSEEK_API_KEY | Credential reference (environment-variable name), resolved per call |
baseURL | https://api.deepseek.com | API endpoint base |
timeoutMs | 10000 | Per-request timeout in milliseconds |
estimateModel | deepseek-v4-flash | Model whose prices the session-cost estimate uses |
offpeakPrices | {input: 1.5, cacheHit: 0.05, output: 4.5} | Off-peak CNY per-million-token prices (uncached input / cache hit / output) |
peakMultiplier | 2 | Peak-hour multiplier over the off-peak prices |
peakWindows | [[9,12],[14,18]] | Beijing-time peak windows as [startHour, endHour) pairs |
topUpUrl | https://platform.deepseek.com/top_up | DeepSeek platform top-up page the readout links to |
usageDays | 7 | Default historical window (in days) for the daily-spend chart |
Usage
-
Type
/balancein the session composer:Balance (CNY): 110.00 Topped up: 100.00 Granted: 10.00 -
In the web GUI, the stats area under the composer shows
Balance: ¥110.00 ⟳; hover reveals the topped-up / granted split, and the ⟳ button refreshes.