Vai al contenuto principale
T

dsh-plugin-crypto-ticker

tomcontral/dsh-plugin-crypto-ticker

Live crypto price ticker for the DSH right sidebar with Binance WebSocket, REST fallbacks and carousel float windows.

Installazione

dsh plugin --profile web add github:tomcontral/dsh-plugin-crypto-ticker

README

Crypto Ticker

dsh-plugin-crypto-ticker

License: MIT DSH >= 0.2.0-rc.2 GitHub stars

Real-time crypto prices in the DeepSeek Harness right sidebar — with carousel float windows.

English · 简体中文


A DeepSeek Harness plugin that adds a Markets tab to the right sidebar, streaming live USDT prices and 24h change for major coins.

Features

  • Live feed — connects to the Binance combined ticker WebSocket first; price ticks flash green/red.
  • Resilient fallback — if the socket delivers nothing within 8s or drops, it falls back to a REST polling chain: Binance (5s) → OKX (5s) → CoinGecko (15s). A supplement loop backfills any pair the stream never delivers, so no row stays stuck.
  • Carousel floats — multi-select coins and float them in a single window that rotates through them (default every 5s). Dots show the current position; click a dot to jump.
  • Switch interval — set the rotation interval (1–120s) in the sidebar Manage coins panel; it applies to all carousel floats instantly and persists.
  • Per-window opacity — each float has a 20–100% opacity slider, remembered per window.
  • Manage coins — add/remove coins from the gear panel; Binance/OKX pairs are derived automatically (SYM+USDT / SYM-USDT). The feed rebuilds live.
  • Master power switch — stop all real-time fetching (socket, polling, supplement) with one click; prices freeze, state persists across restarts.
  • Floats are draggable, position-persisted, and keep streaming even when the sidebar is collapsed. UI follows the DSH language (English / 中文).

Install

From a plugin market / index (recommended): enable Plugins → Experimental plugins → Custom plugin indexes, open Discover, Add index source, and paste the index URL:

https://tomcontral.github.io/dsh-plugin-crypto-ticker/index.json

Manual (Git): install the bundle from this repository in the DSH Plugins page, or add it to your web profile:

github:TomContral/dsh-plugin-crypto-ticker#v0.1.0

Data sources

Binance WebSocket → Binance REST → OKX REST → CoinGecko REST. If all sources fail it shows Offline with a retry button and retries every 30s.

Known limitations

  • Colors follow the international crypto convention (green up / red down).
  • Direct Binance access may be blocked on some networks (e.g. mainland China); the plugin automatically falls back to OKX / CoinGecko. A system proxy may be needed if all sources are unreachable.

Development

FileRole
package.jsondsh.bundle.patch + dsh.client (platform: web) declaration
cordis.patch.ymlInserts one host Loader row crypto-ticker
lib/index.jsHost half: empty apply (placeholder Loader row)
lib/client.jsBrowser half: hand-written factory-style CJS bundle; registers the tab type + slot body + float layer
docs/index.jsonPlugin-market index (served via GitHub Pages)
docs/icons/crypto-ticker.svgMarket / repo icon

lib/client.js follows the @deepseek-ai/dsh-client-modules bundle protocol (window.__ModuleLoader__.load({ id, factory })) — no build step. It only requires react, react/jsx-runtime, react-dom/client from the platform base. Singletons: coinStore (watchlist), feedManager (refcounted feed), floatStore (float windows), intervalStore (global rotation interval), and FloatLayer (an independent React root on document.body).

The market index lives in docs/, so GitHub Pages (main branch /docs) serves it at https://tomcontral.github.io/dsh-plugin-crypto-ticker/index.json.

License

MIT

Plugin correlati