Crypto Market Analyzer
This skill provides automated cryptocurrency market analysis for Bitcoin (BTC) and Ethereum (ETH).
What It Does
- - Fetches market data from Binance public API (no authentication required)
- Analyzes 4-hour timeframe (last 24 hours)
- Analyzes daily timeframe (last 30 days)
- Calculates technical indicators:
- RSI (Relative Strength Index, 14-period)
- Simple Moving Averages (20-day and 50-day)
- Support and resistance levels
- Price change (24h and 7d)
- - Provides sentiment analysis (Bullish/Bearish/Neutral) with confidence level
- Generates structured reports with reasoning
Usage
Generate Market Report
Run the analysis script:
CODEBLOCK0
Output format (JSON):
CODEBLOCK1
Generate Human-Readable Report
To create a user-friendly report, use the JSON output and format it:
CODEBLOCK2
Scheduled Execution
This skill is designed for daily automated execution at 10:00 AM (UTC+8).
To schedule via OpenClaw cron:
CODEBLOCK3
The cron job should:
- 1. Execute the analysis script
- Parse the JSON output
- Format a human-readable report
- Send the report to the user via messaging channel
Technical Details
Data Source
- - API: Binance Public API
- Endpoint: INLINECODE0
- Rate Limits: 1200 request weight per minute (well within limits)
- No Authentication Required: Public market data
Timeframes
- - 4h: 6 candles (24 hours of data)
- 1d: 30 candles (30 days of data)
Indicators Explained
- - RSI: Momentum oscillator (0-100). <30 = oversold, >70 = overbought
- SMA 20/50: Trend indicators. Price > both SMAs = bullish
- Support/Resistance: Recent low/high averages
- Price Change: Percentage change over specified period
Sentiment Logic
Sentiment is determined by combining multiple signals:
- 1. RSI position (oversold/overbought/momentum)
- Price vs moving averages (trend direction)
- Recent price changes (momentum strength)
Each signal contributes to a bullish/bearish score, which determines:
- - Overall sentiment (Bullish/Bearish/Neutral)
- Confidence level (0.3 to 0.9)
- Detailed reasoning
Extending the Skill
To add more cryptocurrencies:
Edit scripts/fetch_crypto_data.py and modify the symbols list:
CODEBLOCK4
To add more indicators:
Extend the calculate_technical_indicators() function with additional calculations (MACD, Bollinger Bands, etc.).
To customize sentiment logic:
Modify the analyze_sentiment() function to adjust weighting and thresholds.
加密货币市场分析器
该技能提供比特币(BTC)和以太坊(ETH)的自动化加密货币市场分析。
功能说明
- - 从币安公共API获取市场数据(无需认证)
- 分析4小时时间框架(最近24小时)
- 分析日线时间框架(最近30天)
- 计算技术指标:
- RSI(相对强弱指标,14周期)
- 简单移动平均线(20日和50日)
- 支撑位和阻力位
- 价格变动(24小时和7日)
- - 提供情绪分析(看涨/看跌/中性)及置信度
- 生成带有推理依据的结构化报告
使用方法
生成市场报告
运行分析脚本:
bash
python3 scripts/fetchcryptodata.py
输出格式(JSON):
json
{
BTCUSDT: {
indicators: {
current_price: 43250.50,
sma_20: 42800.00,
sma_50: 41500.00,
rsi: 58.3,
support: 42000.00,
resistance: 44000.00,
pricechange24h: 2.5,
pricechange7d: 5.8
},
sentiment: {
sentiment: Bullish (看涨),
confidence: 0.75,
reasons: [
RSI (58.3) 显示多头动能,
价格位于20日和50日均线上方 - 看涨趋势,
24小时涨幅强劲 (2.50%) - 看涨
]
},
timestamp: 2026-02-11T14:38:00
},
ETHUSDT: { ... }
}
生成人类可读报告
要创建用户友好的报告,请使用JSON输出并格式化:
📊 加密货币市场分析报告
生成时间: 2026-02-11 14:38
比特币 (BTC)
💰 当前价格: $43,250.50
📈 24h涨跌: +2.5%
📊 7日涨跌: +5.8%
技术指标
- - RSI (14): 58.3
- SMA 20: $42,800
- SMA 50: $41,500
- 支撑位: $42,000
- 阻力位: $44,000
市场判断
🎯 趋势: 看涨 (Bullish)
📊 置信度: 75%
📝 分析理由:
- - RSI (58.3) 显示多头动能
- 价格位于20日和50日均线上方 - 上升趋势
- 24小时涨幅强劲 (2.50%) - 多头信号
以太坊 (ETH)
...
定时执行
该技能设计为每天北京时间10:00自动执行。
通过OpenClaw cron进行调度:
bash
创建cron任务,每天北京时间10:00运行
对应UTC时间02:00
cron任务应:
- 1. 执行分析脚本
- 解析JSON输出
- 格式化人类可读报告
- 通过消息通道将报告发送给用户
技术细节
数据源
- - API: 币安公共API
- 端点: /api/v3/klines
- 速率限制: 每分钟1200请求权重(完全在限制范围内)
- 无需认证: 公共市场数据
时间框架
- - 4小时: 6根K线(24小时数据)
- 1日: 30根K线(30天数据)
指标说明
- - RSI: 动量振荡器(0-100)。<30 = 超卖,>70 = 超买
- SMA 20/50: 趋势指标。价格高于两条均线 = 看涨
- 支撑/阻力: 近期低点/高点平均值
- 价格变动: 指定周期内的百分比变化
情绪逻辑
情绪通过组合多个信号确定:
- 1. RSI位置(超卖/超买/动量)
- 价格与移动平均线的关系(趋势方向)
- 近期价格变动(动量强度)
每个信号对看涨/看跌评分做出贡献,决定:
- - 整体情绪(看涨/看跌/中性)
- 置信度(0.3至0.9)
- 详细推理依据
扩展技能
要添加更多加密货币:
编辑 scripts/fetchcryptodata.py 并修改 symbols 列表:
python
symbols = [BTCUSDT, ETHUSDT, SOLUSDT, ADAUSDT]
要添加更多指标:
通过额外计算(MACD、布林带等)扩展 calculatetechnicalindicators() 函数。
要自定义情绪逻辑:
修改 analyze_sentiment() 函数以调整权重和阈值。