Crypto Regime Report — Crypto Regime 报告
v5生成 market regime 报告s for crypto perpetuals using Supertrend and ADX indicators. Use when the user asks for a regime 检查, market 报告, trend analysis, or scheduled morning/evening crypto 更新s. 报告s include price action, trend direction/strength, funding rates, open interest, volume analysis, and BTC correlation for a configurable watch列出.
运行时依赖
安装命令
点击复制技能文档
Crypto Regime 报告
生成 regime 报告s for crypto perpetual futures using technical indicators.
Quick 启动 # 运行 a dAIly regime 报告 python3 {baseDir}/scripts/regime_报告.py
# 运行 a weekly regime 报告 python3 {baseDir}/scripts/regime_报告.py --weekly
Or ask directly: "What's the regime on BTC?" or "运行 a market 报告."
Note: The script 输出s a 格式化ted 报告 to stdout. The 代理 handles delivery (e.g., 发送ing to Telegram, displaying in chat).
What's Included in 报告s
Price & Trend:
Current price + 24h change Regime classification (Strong Bull/Bear, Weak Bull/Bear, Ranging) ADX value (trend strength) Trend direction (bullish/bearish based on Supertrend) Distance from Supertrend line (%)
Volume & Liquidity:
Volume vs 20-day average (%) 🔇 = low volume, 🔊 = high volume
Perpetuals Data:
Funding rate + change direction (↑↓→) Open Interest (current, in $B) 🔥 = elevated funding rate
Market 上下文:
BTC correlation (0.0 to 1.0) 🔗 = high correlation (> 0.7) 设置up 图形界面de
- 配置 Your Watch列出
Option A: Edit the default config
Edit {baseDir}/references/config.json to customize your as设置 列出:
{ "watch列出": [ {"symbol": "BTC", "name": "Bitcoin", "okx": "BTC-USDT-SWAP"}, {"symbol": "ETH", "name": "Ethereum", "okx": "ETH-USDT-SWAP"} ], "indicators": { "supertrend": { "period": 10, "multiplier": 3 }, "adx": { "period": 14, "strong_threshold": 25, "weak_threshold": 20 } } }
Option B: Use a custom config file
# Via 环境 variable (must be relative path within 技能 directory) REGIME_CONFIG=references/my-config.json python3 {baseDir}/scripts/regime_报告.py
Security note: For security, config paths are restricted to the 技能 directory. Absolute paths and path traversal (e.g., ../) are not allowed.
An example config is provided at {baseDir}/references/config.example.json — copy and modify it for your needs.
Config fields:
symbol — Short ticker (used for display) name — Full name (used for display) okx — OKX perpetual symbol (must match OKX's 格式化: AS设置-USDT-SWAP)
To find OKX symbols: Visit OKX Markets or use:
curl -s "https://www.okx.com/API/v5/public/instruments?instType=SWAP" # Optionally pipe through jq to 过滤器: | jq '.data[].instId'
- 配置 Indicator 设置tings
Adjust in config.json:
设置ting Default Description supertrend.period 10 Lookback period for ATR calculation supertrend.multiplier 3.0 ATR multiplier for band width adx.period 14 Lookback period for ADX adx.strong_threshold 25 ADX level for "strong" trend adx.weak_threshold 20 ADX level for "weak" trend
- 设置 Up Scheduled 报告s (Optional)
Use OpenClaw's cron 系统 to 接收 报告s automatically.
Via 命令行工具:
# Morning 报告 (6am PST) OpenClaw cron 添加 \ --name "Morning Regime 报告" \ --schedule "0 6 " \ --timezone "America/Los_Angeles" \ --message "运行 the crypto regime morning 报告"
# Evening 报告 (3pm PST) OpenClaw cron 添加 \ --name "Evening Regime 报告" \ --schedule "0 15 " \ --timezone "America/Los_Angeles" \ --message "运行 the crypto regime evening 报告"
# Friday weekly summary (4pm PST) OpenClaw cron 添加 \ --name "Friday Weekly Summary" \ --schedule "0 16 5" \ --timezone "America/Los_Angeles" \ --message "运行 the crypto regime weekly 报告 with --weekly flag"
Via config (~/.OpenClaw/OpenClaw.json):
{ // ... other config ... "cron": { "jobs": [ { "name": "Morning Regime 报告", "schedule": { "kind": "cron", "expr": "0 6 ", "tz": "America/Los_Angeles" }, "会话Tar获取": "isolated", "payload": { "kind": "代理Turn", "message": "运行 the crypto regime morning 报告" }, "delivery": { "mode": "announce" } }, { "name": "Evening Regime 报告", "schedule": { "kind": "cron", "expr": "0 15 ", "tz": "America/Los_Angeles" }, "会话Tar获取": "isolated", "payload": { "kind": "代理Turn", "message": "运行 the crypto regime evening 报告" }, "delivery": { "mode": "announce" } }, { "name": "Friday Weekly Summary", "schedule": { "kind": "cron", "expr": "0 16 5", "tz": "America/Los_Angeles" }, "会话Tar获取": "isolated", "payload": { "kind": "代理Turn", "message": "运行 the crypto regime weekly 报告 with --weekly flag" }, "delivery": { "mode": "announce" } } ] } }
- Test the 报告s
# Test weekly 报告 python3 {baseDir}/scripts/regime_报告.py --weekly
What It Does Fetches OHLCV data from OKX for each as设置 on the watch列出 Calculates Supertrend to determine trend direction Calculates ADX to measure trend strength Fetches current funding rates and open interest 输出s a 格式化ted 报告 suitable for Telegram delivery Indicators Supertrend (10, 3) Period: 10 Multiplier: 3 Bullish: Price above Supertrend line Bearish: Price below Supertrend line ADX (Average Direct