BTC Analyzer
Fetch real-time BTCUSDT candlestick data from Binance public REST API and compute a directional trading signal based on EMA20 slope and RSI14 momentum.
When to Use
- - User asks: "analisa BTC sekarang"
- User asks: "BTC akan naik atau turun?"
- User asks: "berikan sinyal trading BTC 15 menit"
- User asks: "cek market BTC sekarang"
How It Works
This skill runs a local Python script that:
- 1. Fetches 200 candles of BTCUSDT 15m OHLCV data from Binance public API (no API key needed).
- Computes EMA20 from closing prices.
- Computes RSI14 from closing prices.
- Determines direction based on: price vs EMA20, RSI level, and recent candle slope.
- Returns a strict JSON object with decision, confidence score, and reasoning.
Workflow
Step 1 — Run the analyzer script via bash tool:
python3 ~/.npm-global/lib/node_modules/openclaw/skills/btc-analyzer/analyze.py
Step 2 — Parse the JSON output.
Step 3 — Present the result to the user clearly, including:
- - Decision (UP / DOWN / SKIP)
- Confidence percentage
- Reason (EMA, RSI, slope context)
- Last close price
- Timestamp
Output Format
The script returns strict JSON:
{
"decision": "UP",
"confidence": 72,
"reason": "price above EMA20, RSI 58, bullish slope last 3 candles",
"lastClose": 94500.00,
"ema20": 94200.00,
"rsi14": 58.3,
"timestamp": "2026-02-23T00:00:00Z"
}
Decision values:
- - UP: bullish signal, consider long
- DOWN: bearish signal, consider short
- SKIP: no clear signal, stay out
Confidence range: 0-100 (higher = stronger signal)
Signal Logic
- - RSI < 30: decision = UP (oversold)
- RSI > 70: decision = DOWN (overbought)
- Price > EMA20 AND slope up: decision = UP
- Price < EMA20 AND slope down: decision = DOWN
- Otherwise: decision = SKIP
Error Handling
If Binance API is unreachable or returns an error:
{"decision":"SKIP","confidence":0,"reason":"API error or network issue","lastClose":0,"timestamp":""}
Guardrails
- - Always run the script via bash tool — never fabricate or guess output values.
- Do not hardcode prices or decisions.
- If script fails, show the actual error message to the user.
- This skill uses Binance public API only — no API key or authentication required.
- Data is real-time; do not cache or reuse previous results.
BTC 分析器
从币安公共REST API获取实时BTCUSDT蜡烛图数据,并基于EMA20斜率和RSI14动量计算方向性交易信号。
使用场景
- - 用户询问:现在分析BTC
- 用户询问:BTC会涨还是跌?
- 用户询问:提供15分钟BTC交易信号
- 用户询问:现在查看BTC市场
工作原理
此技能运行本地Python脚本,执行以下操作:
- 1. 从币安公共API获取200根BTCUSDT 15分钟OHLCV蜡烛图数据(无需API密钥)。
- 根据收盘价计算EMA20。
- 根据收盘价计算RSI14。
- 基于价格与EMA20的关系、RSI水平及近期蜡烛图斜率判断方向。
- 返回包含决策、置信度分数和推理依据的严格JSON对象。
工作流程
步骤1 — 通过bash工具运行分析脚本:
python3 ~/.npm-global/lib/node_modules/openclaw/skills/btc-analyzer/analyze.py
步骤2 — 解析JSON输出。
步骤3 — 向用户清晰呈现结果,包括:
- - 决策(上涨/下跌/观望)
- 置信度百分比
- 原因(EMA、RSI、斜率背景)
- 最新收盘价
- 时间戳
输出格式
脚本返回严格JSON格式:
{
decision: UP,
confidence: 72,
reason: 价格高于EMA20,RSI 58,最近3根蜡烛图呈看涨斜率,
lastClose: 94500.00,
ema20: 94200.00,
rsi14: 58.3,
timestamp: 2026-02-23T00:00:00Z
}
决策值:
- - UP:看涨信号,考虑做多
- DOWN:看跌信号,考虑做空
- SKIP:无明确信号,保持观望
置信度范围:0-100(数值越高表示信号越强)
信号逻辑
- - RSI < 30:决策 = UP(超卖)
- RSI > 70:决策 = DOWN(超买)
- 价格 > EMA20 且斜率向上:决策 = UP
- 价格 < EMA20 且斜率向下:决策 = DOWN
- 其他情况:决策 = SKIP
错误处理
如果币安API无法访问或返回错误:
{decision:SKIP,confidence:0,reason:API错误或网络问题,lastClose:0,timestamp:}
使用规范
- - 始终通过bash工具运行脚本——切勿编造或猜测输出值。
- 不要硬编码价格或决策。
- 如果脚本运行失败,向用户显示实际错误信息。
- 此技能仅使用币安公共API——无需API密钥或身份验证。
- 数据为实时数据;请勿缓存或重复使用之前的结果。