Daily Market Summary
Generate a daily cryptocurrency market summary report with real-time data from public APIs.
Workflow
Step 1: Fetch Real-Time Data
Run the data collection script:
python scripts/fetch_data.py
This fetches from multiple public APIs (no authentication required):
- Binance: BTC/ETH tickers, all USDT pairs for ranking, funding rates
- Alternative.me: Fear & Greed Index
- CoinGecko: Trending coins
- mempool.space: BTC network fees
Output: market_data.json in the current working directory.
Step 2: Generate HTML Report
python scripts/generate_report.py market_data.json market_summary.html
Reads market_data.json and produces a styled HTML report.
Step 3: Present to User
- Use
preview_url to show the HTML report in the browser.
- Use
deliver_attachments to send the file to the user.
- Provide a concise text summary of key data points below the report.
Report Requirements
The report MUST include these sections:
- BTC & ETH 24h 行情 — Price, 24h change %, high/low, volume, trades
- 涨跌榜 — Top 3 gainers and top 3 losers (filtered by >$1M volume)
- 市场情绪 — Fear & Greed Index with visual gauge + BTC/ETH funding rates
- 热门趋势 & 链上动态 — CoinGecko trending + BTC mempool fees as network activity proxy
Data Presentation Rules
- ALL data must be queried in real-time — never use cached or hardcoded data
- Present data in table format with clear headers
- Always annotate the query timestamp (e.g., "查询时间:2026-04-18 17:30 UTC+8")
- Use Chinese stock market convention: RED = up (涨), GREEN = down (跌)
- NEVER include any trading advice, buy/sell recommendations, or price predictions
- If an API fails, note which data source is unavailable and continue with the rest
Script Notes
scripts/fetch_data.py: Data collection from public APIs. No proxy needed — Binance public API is globally accessible. If Binance fails, try setting HTTPS_PROXY if a proxy is available.
scripts/generate_report.py: HTML report generator. Takes JSON input and produces a dark-themed responsive HTML file.