Preface¶
In the DSH plugin ecosystem, displaying balance and usage is a fairly specific problem: the official API can check balances, and Harness session logs show usage, but the sidebar lacks an entry point that simultaneously shows current balance, refresh status, and usage trends. dsh-quota-badge is a DSH plugin that displays the DeepSeek account balance in real time in the DeepSeek Harness sidebar and provides balance monitoring and usage statistics on the settings page. Below we introduce its capabilities, installation method, and daily usage considerations.
What This Is¶
dsh-quota-badge is a DSH plugin hosted in the GitHub repository yoiizesdev-crypto/DSH-Balance-display and licensed under MIT.
It fetches data from the official DeepSeek balance API:
GET https://api.deepseek.com/user/balance
It displays a balance badge in the DeepSeek Harness sidebar and shows currency details, balance trends, and usage statistics on the Settings → Balance Monitoring page.
Core Features¶
Sidebar Balance Badge¶
Displays the DeepSeek account balance in real time at the bottom of the DeepSeek Harness sidebar, supporting all currencies in the account:
CNY / USD / Others
Refresh methods include automatic refresh and manual refresh. When the balance changes, the numbers play a rolling animation; during manual refresh, an increase is shown in green and a decrease in red.
Settings Page: Balance Monitoring¶
On the Settings → Balance Monitoring page, you can see:
- Balance card
- Currency details
- Balance trend Sparkline
The page also allows you to adjust balance display and refresh-related parameters. Parameters, history, and usage data are stored in:
~/.dsh/.quota-badge.json
Usage Statistics¶
Usage statistics provide the following capabilities:
- Historical backfill
- Per-key statistics
- Summary cards
- Daily spending line chart
- Model breakdown table
Usage statistics are locally estimated based on Harness session logs and the official DeepSeek peak/off-peak pricing, and are not billing results returned by official billing APIs.
Peak/Off-Peak Pricing Coordinate System¶
Hovering over the balance badge for 3 seconds displays the DeepSeek peak/off-peak pricing coordinate system. This coordinate system is used to check the peak/off-peak price for the current time period.
Weekends (Saturday/Sunday) have all-day off-peak pricing, effective from 2026-08-23.
Installation and Activation¶
Requirements:
- DeepSeek Harness desktop or web version
- Node.js >= 18
Installation steps:
- Navigate to the Harness profile directory:
cd ~/.dsh/profiles/desktop
- Install the plugin package:
npm install <git repository URL>
- Edit
~/.dsh/profiles/desktop/package.jsonand adddsh-quota-badgeto thedsh.profile.bundlesarray:
{
"dsh": {
"profile": {
"bundles": [
"dsh-quota-badge"
]
}
}
}
- Ensure that
~/.dsh/.credentials.yamlcontains the DeepSeek API Key:
DEEPSEEK_API_KEY: sk-xxxxxxxxxxxxxxxx
-
Fully exit and reopen DeepSeek Harness.
-
View trends and adjust parameters on the
Settings → Balance Monitoringpage.
Typical Usage¶
- Check the current balance: Look at the balance badge at the bottom of the sidebar.
- Manual refresh: Click the manual refresh entry on the badge to trigger a balance query and the number rolling animation.
- View multi-currency balances: View all currency details in the account on the
Settings → Balance Monitoringpage. - View balance trends: View sampled data in the balance trend Sparkline.
- View usage statistics: In the usage statistics area, view historical backfill, per-key statistics, summary cards, daily spending line charts, and model breakdown tables.
- Automatic update check: Enabled by default, automatically checks for new versions on GitHub at startup and every 6 hours.
Applicable Scenarios and Notes¶
Suitable for the following scenarios:
- Frequently launching tasks in DeepSeek Harness and needing to check the account balance at any time.
- Needing to view balance details for CNY, USD, and other currencies.
- Needing to view local usage statistics by key, by day, and by model.
- Needing to compare peak/off-peak pricing to view the current period price.
Notes before use:
- The plugin runs with the current DSH process permissions; check the source code and the
MITlicense before installation. - Usage statistics are local estimates based on Harness session logs and official DeepSeek peak/off-peak pricing.
- While the plugin is running, the default
cordisplugin management button is hidden and restored after uninstallation. - The balance API depends on
DEEPSEEK_API_KEY; confirm that the configuration file has been correctly written. - Weekends (Saturday/Sunday) have all-day off-peak pricing, effective from 2026-08-23.
Conclusion¶
dsh-quota-badge solves a specific problem: bringing DeepSeek account balances, currency details, balance trends, and usage statistics into the DeepSeek Harness sidebar and settings page. Check the source code and license before installation, enable it according to your profile configuration, and then adjust refresh and display parameters based on actual usage.
GitHub repository:
https://github.com/yoiizesdev-crypto/DSH-Balance-display