
dxawdc/stock-heatmap
Browser automationThis page was translated automatically. Technical details may differ from the original. View the original
A-share real-time heattree: Tencent market + Shenwan industry grouping, Plotly/ECharts dual renderers, FastAPI backend
Overview
Real-time A-share full market heat tree (Treemap). Pulls full market data from public data sources such as Tencent Finance, grouped by **, with ** representing turnover/market value and ** representing price changes. Supports Plotly/ECharts dual renderers, full-screen viewing, and image export. (Filter embedded pages: grouping method / block size / Top-N / Inclusion and exclusion filters, all switched in real time within the browser, color block markings with price change) - : Shanghai Main Board + STAR Market + Shenzhen A-shares + Beijing Stock Exchange, about 5,000+ stocks - : Grouped by Shenwan primary industry / flat layout (no grouping) - : Trading volume (10,000 yuan), total market value (100 million yuan), circulating market capitalization (100 million yuan) - : Sector / market color taken from official indices (Shenwan Industry Index, Shanghai A-share Index), not simple equal weighted average - : You can only look at the top N stocks by trading volume by market cap - :P lotly (desktop, strong interaction) and ECharts (mobile-friendly), On-demand lazy loading - One-click fullscreen, supports exporting PNG/JPEG images - : Instant loading after drive/reboot, cache miss only pulls the same key once to avoid repeated upstream printing All three versions are supported: the web version uses the akshare trading calendar; the plugin version directly connects to the Sina co-source trading calendar interface (klc_td_sh.txt), using a built-in decoder to restore the full trading day of the year and cache it to chrome.storage.local; The Skill version connects directly to the Sina SSE daily K-line interface, building the calendar with real trading dates (plaintext JSON, no decoding required), with 24-hour disk caching. If any calendar interface fails to pull, it will automatically revert to the "weekend only" logic, without affecting data accuracy. Python + FastAPI backend, suitable for deploying services running for extended periods, allowing multiple users to access or periodic cache refreshes. :FastAPI · Uvicorn/Gunicorn · pandas · akshare · requests · Plotly · ECharts The first launch event pulls the stock code list, Shenwan industry mapping, and trading calendar (about 30–60 seconds) in the backend. During this period, the top of the page shows "Shenwan Industry Loading" progress, and before loading is complete, the group temporarily uses the exchange section as a backup. - GET /api/sector-status — Shenwan industry mapping construction progress { ready, progress, count } - GET /api/cache-status — Disk cache file list, trading day, and market status
Overview (machine translated)
Real-time A-share full market heat tree (Treemap). Pulls the full market data from public data sources such as Tencent Finance, grouped by Shenwan first-level industry, uses color block size to indicate turnover/market value, color indicates price change, supports Plotly/ECharts dual renderers, full-screen viewing, and image export.
This repository offers three versions, with consistent features and interfaces but different deployment methods:
🌐 Web version web/ |
🧩 Plugin version extension/ |
🤖 Skill version skill/ |
|
|---|---|---|---|
| Form | Python Self-Built Web Service | Chrome Extension (Manifest V3) | WorkBuddy Agent Skill |
| Backend | FastAPI + akshare | No backend, pure frontend direct connection to data sources | Pure standard library scripts (requests only) |
| How to use | After launching the service, visit the browser | Click the toolbar icon to open in a new tab | Say to WorkBuddy, ‘Generate A-share heatchart’ |
| Data cache | Memory + Disk JSON (by trading day) | Memory + chrome.storage.local |
Disk JSON (Shenwan mapping / trading calendar 24h) |
| Applicable scenarios | Team/public network sharing, scheduled caching | Personal local use, zero deployment, ready to use out of the box | One-click image generation within AI conversations, embedded filters |
Author: Brother Cai · WeChat Official Account: You can call me Brother Cai
Scan the WeChat QR code to follow:
📸 Interface Preview
The interface is consistent across all three versions; the screenshots below are universal.
Plotly Renderer (desktop default, right side with a ribbon with fluctuation, strong interaction)
ECharts Renderer (Dark style, sector top column shows industry ups and downs, mobile-friendly)
Full Screen Mode (One-click full screen, floating toolbar at the bottom, press Esc to exit)
🤖 ** Skill Version Interface** (Filter embedded pages: grouping method / color block size / Top-N / including exclusion filters, all switched in real time within the browser, with color block markings for change and decrease)
✨ Universal Features (Consistent across all three versions)
- Full Market Coverage: Shanghai Main Board + STAR Market + Shenzhen A-shares + Beijing Stock Exchange, about 5,000+ stocks
- Two types of grouping: Grouped by Shenwan first-level industry / Flat layout (no grouping)
- Three Color Block Sizes: Transaction Amount (10,000 RMB), Total Market Value (100 million RMB), Circulating Market Value (100 million RMB)
- True Rise and Fall Color: Sector/market color is taken from official indices (Shenwan Industry Index, SSE A-share Index), rather than simple equal weighted averages
- Top-N Filter: You can only look at the top N stocks by transaction volume or market capitalization
This page was translated automatically. Technical details may differ from the original.
Recommended Tools
Try a different keyword or remove a filter.
Install
npx skillfish add dxawdc/stock-heatmap