# LeekBox ้Ÿญ่œ็›’ๅญ ๐Ÿฅฌ [English](README.en.md) | ็ฎ€ไฝ“ไธญๆ–‡ An A-share market dashboard as a DeepSeek Harness (DSH) web client plugin. Click the ๐Ÿฅฌ entry in the DSH sidebar to open the dashboard. | Tab | What it does | | --- | --- | | ๐Ÿ“Š ๅคง็›˜ | SSE / SZSE / ChiNext / STAR50 realtime indices, 30s auto-refresh | | ๐Ÿ’น ่กŒๆƒ… | Search stocks / ETFs / convertible bonds / LOFs (code, name, pinyin) + multi-pool boards (A-share / ETF / convertible bond / LOF, by gain, amount, turnover or main net inflow) + sector boards + dragon-tiger list | | โญ ่‡ช้€‰ | Persistent watchlist with realtime quotes (`$DSH_HOME/.leekbox-watchlist.json`), grouped; **position cost & live P/L** (click the qty/cost cells to edit inline; live floating P/L + return % + a summary bar), **price alerts** (๐Ÿ”” per-row button: price above/below, % move thresholds; watched during trading hours, toast + desktop notification + beep on trigger, then auto-removed; persisted in `$DSH_HOME/.leekbox-alerts.json`); one-click JSON backup / CSV export (position fields included), import from JSON/CSV/text (merge or replace) | | ๐Ÿ” ้€‰่‚ก | Multi-signal screener over the whole market: pool + basic filters + technical signals, weighted score ranking | | ๐Ÿ“ฐ ๅฟซ่ฎฏ | 7x24 news aggregated from Sina, Eastmoney and Jin10, filterable by source; important items highlighted in red | | ๐Ÿค– ๅˆ†ๆž | **AI stock analysis**: pick a stock and have the server summarize its live quote + last 60 daily bars + F10 fundamentals into a structured Chinese analysis (with risk + disclaimer; copy / regenerate supported). The model is configured in the panel header โš™๏ธ **global settings**: a **provider dropdown** (DeepSeek / OpenAI / **Anthropic Claude** / Moonshot Kimi / Zhipu / Qwen / b.ai etc.; OpenAI-compatible and native Anthropic protocols) + a **model dropdown** (fetch the real list via ใ€Œ่Žทๅ–ๆจกๅž‹ใ€ or type one manually); persisted in `$DSH_HOME/.leekbox-analysis.json`, key stored server-side and shown masked only | The market tab opens with a sentiment thermometer: limit-up / limit-down / broken-board counts, whole-market up/down breadth, a consecutive-board ladder (2ๆฟ/3ๆฟ/โ€ฆ plus the highest board), and an expandable limit-up pool list (click a name to open its detail popup). Clicking any stock name (including in the watchlist) opens a dedicated detail popup window, Tonghuashun-style: large price header, 15 live indicators, an **intraday minute chart** (price line + volume-weighted average line + volume bars + prev-close baseline with a relative-% right axis and hover tooltip), candlestick K-line โ€” forward-adjusted (qfq), day/week/month/5m/30m, with MA5/10/20 overlays, volume subchart, last-price line and a hover crosshair legend โ€” plus a **main money-flow bar chart** (last 15 days, inflow red / outflow green, hover shows the day's net inflow) over the flow detail table, and an **F10 fundamentals card** (last 8 report periods: revenue / net profit with YoY, weighted ROE, gross margin, debt ratio, EPS โ€” Eastmoney F10 feed). Popups are draggable, can be stacked for comparison, close via ESC or the backdrop. ## Data sources - Realtime quotes / indices / K-line: Tencent Finance (qt.gtimg.cn, web.ifzq.gtimg.cn, ifzq.gtimg.cn) - Rankings / screener universe: Sina Finance (vip.stock.finance.sina.com.cn) - Search suggest: Eastmoney (searchadapter.eastmoney.com) - News: Sina zhibo stream + Eastmoney fast news (np-listapi.eastmoney.com) + Jin10 flashes; cross-source dedup merges the same event into one item even when worded differently - AI analysis: model is user-configured (OpenAI-compatible endpoint, e.g. OpenAI / DeepSeek); stock data reuses the quote / K-line / F10 feeds above, and the request is proxied server-side through `/chat/completions` (key stays server-side, never sent to the browser) All requests are proxied by the plugin's host half (a cordis plugin inside the web profile) and served to the browser same-origin under `/api/leekbox/*`, loopback-only. For research reference only โ€” not investment advice. ## Requirements - DeepSeek Harness (DSH) **>= 0.1.1-rc.1** (declared in `package.json` as `dsh.engines.dsh`) - Runs in the **web profile** only (`dsh.client.platform: "web"`): the route host lives inside the DSH process, and the browser bundle talks to it same-origin under `/api/leekbox/*` (loopback only) ## Install ```sh dsh plugin --profile web add ``` or manually: ```sh mklink /J "$DSH_HOME\profiles\web\node_modules\dsh-leekbox" "" # then append to $DSH_HOME/profiles/web/cordis.patch.yml: # - insert: # - id: leekbox # name: 'dsh-leekbox' ``` Refresh the page after install. Host-side changes need a DSH restart. ## Structure - `lib/index.js` โ€” host half: `/api/leekbox/*` routes + watchlist persistence + AI analysis (model config persistence + `/chat/completions` proxy) - `lib/client.js` โ€” browser bundle: sidebar entry + dashboard panel (React). **Generated, do not hand-edit** โ€” sources live in `src/client/` (15 single-responsibility files), bundled with esbuild via `npm run build` (`npm run dev` for watch mode); React is injected by the host and never bundled - `lib/screener.js` โ€” screener engine (indicators computed from daily K-line) - `cordis.patch.yml` โ€” plugin roster registration (`dsh.bundle.patch`) ## Disclaimer This plugin only aggregates public free quote endpoints; data may be delayed or missing. Everything here is for learning and research, not investment advice. ่‚กๅธ‚ๆœ‰้ฃŽ้™ฉ๏ผŒๅ…ฅๅธ‚้œ€่ฐจๆ…Žใ€‚