DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-matrix-terminal-balance

v

dsh-matrix-terminal-balance

Discovered

DeepSeek balance route for the dsh-matrix-terminal prompt line; the API key never leaves the host process.

dsh-matrix-terminal-balance

Listed on dsh-plugin.org

The host half of dsh-matrix-terminal.

It exposes one authenticated route that answers with the DeepSeek account balance behind the API key the harness already configured. The key is resolved per request through the credential service, used for a single outbound call, and never leaves the host process: the browser receives decimal strings and nothing else.

The Matrix Terminal prompt line with the account balance right-aligned

The route rides the harness's authenticated /api channel: an unauthenticated request gets 401, and a request carrying a foreign Origin gets 403, so the amount is only readable from a page your own harness served to you.

GET /api/matrix-terminal.balance

{ "ok": true, "available": true,
  "wallets": [ { "currency": "USD", "total": "0.00", "granted": "0.00", "toppedUp": "0.00" } ] }

What it does

  • Resolves DEEPSEEK_API_KEY from the credential service — the same reference the model provider reads, so the number shown is the number being spent.
  • Calls https://api.deepseek.com/user/balance with an 8 s timeout.
  • Caches the last successful answer for 30 s, and shares one in-flight read between concurrent requests, so focus-driven refreshes in the UI do not each cost a request.
  • Returns { ok: false, reason } — no-key, network, http-<status> or protocol — instead of failing the route. The skin treats every failure as "no balance" and keeps the last known amount.

Nothing is logged beyond the plugin id, and no key material is written to any response, cache file or log line.

Requirements

  • DeepSeek Harness 0.2.1-rc.5 or a compatible release, with the connection and credentials services (both are part of the stock host).
  • An API key configured for the DeepSeek provider. Without one, the route answers no-key and the prompt line simply ends at the cursor.

Install

Not on npm yet — install straight from the repository:

dsh plugin --profile web add github:victorcastro55/dsh-matrix-terminal-balance

Companion to dsh-matrix-terminal; installing it alone is harmless — the route exists and nothing reads it. Installing the skin alone is also fine — the prompt line just omits the amount.

Using the route from your own plugin

The route is namespaced, owner-authenticated and stable; anything on the page can read it:

const res = await fetch('/api/matrix-terminal.balance', { headers: { accept: 'application/json' } });
const body = await res.json(); // { ok, available?, wallets: [{ currency, total, granted?, toppedUp? }] }

total is the documented decimal string from the platform, not a number, so formatting stays exact. The skin formats it as <$0.01 below a cent, groups thousands, and joins multiple wallets with +.

License

MIT. Not affiliated with DeepSeek. The balance endpoint is a documented platform API; using it consumes no tokens.

Comments

Loading…

Similar plugins

dsh-balance-local

by chenpengye

Local-only DeepSeek API balance plugin for dsh: queries https://api.deepseek.com/user/balance on the Host side; the API key never leaves the server process.

UI & ExperienceTerminal & ClientsManifest valid

★ 0

MIT

TypeScript

Aug 21, 2026

dsh plugin --profile web add dsh-balance-local

by flyingfishzxf

A simple DeepSeek API balance display plugin for dsh(deepseek-harness)

Tools & CapabilitiesTerminal & ClientsModels & ProvidersManifest valid

★ 0

MIT

JavaScript

Sep 29, 2026

dsh plugin --profile web add dsh-dsbal

by Bob-Bo1

Shows DeepSeek API balance and local DSH Flash and Pro usage costs.

Tools & CapabilitiesDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 1

MIT

JavaScript

Aug 18, 2026

dsh plugin --profile web add deepseek-balance

by CowB0ySpike

DSH plugin: shows the DeepSeek API key account balance below the composer.

Terminal & ClientsManifest valid

★ 0

MIT

JavaScript

Nov 4, 2026

dsh plugin --profile web add dsh-deepseek-balance

by HFUT-zhengjiahao

DeepSeek API balance, conversation token usage, and CNY cost estimation for DeepSeek Harness (DSH)

Terminal & ClientsSessions & MessagesManifest valid

★ 0

MIT

JavaScript

Sep 19, 2026

dsh plugin --profile web add dsh-balance

by MarJose123

DeepSeek Harness plugin: your DeepSeek API balance and the current peak/off-peak billing window, below the message input.

Manifest valid

★ 0

MIT

JavaScript

Oct 18, 2026

dsh plugin --profile web add dsh-simple-usage-info