Futures Real-time Monitoring System
Paste the following prompt into your AI chat to install this skill:
Please follow https://skillhub.cn/install/skillhub.md to install @user_25b0a437/futures-monitor.
About this skill
Problem and Background
Futures trading spans 6 major exchanges with over 90 main contracts, requiring real-time market monitoring for strategy and risk management. Existing tools often depend on external software or cloud services, leading to complex deployment, high latency, and data privacy concerns. Developers or traders need a lightweight, localized solution that can be quickly launched to provide comprehensive market data and analysis features for rapid decision-making.
Core Capabilities and Workflow
This skill delivers a locally running futures monitoring dashboard, with core capabilities built on a pure tech stack:
- Data Coverage and Acquisition: Automatically fetches market data via the
WorkBuddy finance-data API, covering 90+ main contracts across 6 exchanges; the backend uses thehttp.serverstandard library with no additional dependencies. - Interactive Analysis Interface: The frontend integrates
ECharts 5.5to generate interactive charts like candlestick and minute charts, supporting zoom, tooltips, and shortcuts (e.g.,Rto refresh,Escto close popups). - Real-time Feature Modules: Includes price alerts (set breakout/breakdown rules with popup notifications), a profit/loss calculator (input entry prices for automatic return calculation), market overview, gain/loss rankings, and more, served via API endpoints (e.g.,
/api/daily,/api/detail). - Performance Optimization: Employs LRU caching (adjustable limit) and ThreadPoolExecutor for concurrent processing with exponential backoff retries, ensuring responsiveness under high loads.
The workflow involves three deployment steps: first, copy the server.py and index.html template files to a local directory; second, run the Python script to start the service (default port 8765, customizable via -p); third, the browser auto-opens the dashboard, allowing immediate use of all features with data auto-refreshing every 30 seconds to 5 minutes.
Applicability and Considerations
- Dependencies and Limits: Data relies on an external API, requiring stable network access; the API may have call frequency limits, causing update delays. Chart rendering depends on browser performance, demanding certain client-side capabilities.
- Deployment Scope: The skill supports only local single-machine deployment, unsuitable for multi-user sharing; manual parameter adjustment (e.g.,
--no-browser) is needed for port conflicts. - Feature Boundaries: The current version focuses on main contracts, potentially excluding all next-month contracts or options data; alert rules persist to
alert_rules.jsonand require reloading after service restart. - Extensibility: API endpoints (e.g.,
/api/alerts/add,/api/pnl) allow basic extensions, but customization requires source code modification; thread count and cache size are tunable via startup parameters (e.g.,--workers,--cache-size).
Overall, this skill suits individual traders, developers, or small teams for quick local monitoring setup, but performance and dependency risks should be evaluated in multi-user or high-frequency trading scenarios.
Use Cases
- When a futures trader needs to monitor real-time price fluctuations for copper contracts on the Shanghai Futures Exchange and set breakout/breakdown alert rules, using the system to trigger popup notifications for market response.
- As an individual investor, after holding futures contracts, they need to calculate profit/loss, return rate, and margin requirements at current prices; inputting entry price and lot size via the system yields quick results.
- A futures market analyst requires weekly summaries of price change statistics for main contracts across 6 major exchanges, using the system's market overview to generate gain/loss rankings and TOP5 reports.
- A quantitative strategy developer needs 30-day daily data for model backtesting, batch downloading historical market data for specified contracts via system API endpoints for analysis.
Best For
- Futures traders: Need to monitor real-time market data for multiple commodities and set automated price alerts to execute trading strategies timely.
- Individual investors: Want to calculate profit/loss and margin requirements for positions to aid investment decisions and risk management.
- Market researchers: Regularly analyze holding positions and warehouse receipt changes to write in-depth market reports.
- Quantitative strategy developers: Rely on API access to historical data for developing, backtesting, and optimizing trading models.
Related Skills
A universal base component that automatically launches the Edge browser and connects the BrowserSkill extension, ensuring readiness for web scraping and browser automation tasks.
A fully local-run WeChat chat analysis tool with MBTI personality inference, sentiment analysis, risk detection, relationship health assessment, and conversation prediction, emphasizing privacy.
Fetches the top 20 A-share stocks by trading volume from Wencai, including ranking, price changes, and sectors, with sector analysis.
Performs project discrimination, classification, and structured extraction on bidding documents, outputting standardized data with support for manual review.