Back to skills
SkillHub ClubShip Full StackFull Stack
btc-shortterm-predictor
BTC 15分钟短线预测 - 技术指标分析,预测涨跌方向。每次调用0.005 USDT。
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Stars
3,030
Hot score
99
Updated
March 20, 2026
Overall rating
C4.0
Composite score
4.0
Best-practice grade
C58.6
Install command
npx @skill-hub/cli install openclaw-skills-btc-shortterm-predictor
Repository
openclaw/skills
Skill path: skills/ffffff9331/btc-shortterm-predictor
BTC 15分钟短线预测 - 技术指标分析,预测涨跌方向。每次调用0.005 USDT。
Open repositoryBest for
Primary workflow: Ship Full Stack.
Technical facets: Full Stack.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install btc-shortterm-predictor into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding btc-shortterm-predictor to shared team environments
- Use btc-shortterm-predictor for development workflows
Works across
Claude CodeCodex CLIGemini CLIOpenCode
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: btc-shortterm-predictor
description: BTC 15分钟短线预测 - 技术指标分析,预测涨跌方向。每次调用0.005 USDT。
version: 1.0.0
metadata:
openclaw:
requires:
env:
- SKILLPAY_API_KEY
---
# BTC 短线预测器
**高频交易神器** - 15分钟级别BTC涨跌预测
## 战绩参考
- 胜率:91% (10胜1负)
- 日盈利:~900美元
- 频率:高频(15分钟级别)
- 模式:全自动运行
## 收费模式
每次调用 **0.005 USDT**(约0.035元人民币)
## 使用方法
```bash
# 获取当前预测
node scripts/predict.js
# 查看历史战绩
node scripts/predict.js history
# 自动模式(每15分钟预测一次)
node scripts/predict.js auto
```
## 预测模型
基于技术指标组合:
- RSI(相对强弱指数)
- MACD(异同移动平均线)
- 布林带
- 成交量变化
- 价格动量
## 输出示例
```
════════════════════════════════════════════════════
📊 BTC 15分钟预测
════════════════════════════════════════════════════
当前价格: $67,432.50
预测时间: 14:15 - 14:30
🎯 预测: 涨 📈
置信度: 78%
技术指标:
RSI(14): 62.3 → 看涨
MACD: 金叉形成 → 看涨
布林带: 价格触及下轨 → 反弹信号
成交量: 增加15% → 买盘增强
建议: BUY YES
止损: $67,200
止盈: $67,800
════════════════════════════════════════════════════
```
## SkillPay 配置
环境变量:
- `SKILLPAY_API_KEY` - SkillPay API密钥
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### scripts/predict.js
```javascript
#!/usr/bin/env node
/**
* BTC 短线预测器
* 15分钟级别涨跌预测 - 每次调用 0.005 USDT
*/
const { chargeUser, getPaymentLink, SKILL_PRICE } = require('./skillpay');
const { getCurrentPrice, getKlines, get24hTicker } = require('./binance');
const { predict } = require('./indicators');
function formatTime(date = new Date()) {
return date.toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit' });
}
function formatPrediction(p) {
const lines = [];
lines.push('═'.repeat(60));
lines.push('📊 BTC 15分钟预测');
lines.push('═'.repeat(60));
lines.push('');
lines.push(`当前价格: $${p.currentPrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`);
lines.push(`预测时间: ${formatTime()} - ${formatTime(new Date(Date.now() + 15 * 60 * 1000))}`);
lines.push('');
// 预测结果
const directionEmoji = p.direction === 'UP' ? '📈' : (p.direction === 'DOWN' ? '📉' : '➡️');
const directionText = p.direction === 'UP' ? '涨' : (p.direction === 'DOWN' ? '跌' : '震荡');
lines.push(`🎯 预测: ${directionText} ${directionEmoji}`);
lines.push(`置信度: ${p.confidence.toFixed(0)}%`);
lines.push('');
// 技术指标
lines.push('技术指标分析:');
for (const s of p.signals) {
const emoji = s.bullish === true ? '✅' : (s.bullish === false ? '❌' : '➖');
lines.push(` ${emoji} ${s.indicator}(${s.value}) ${s.signal}`);
}
lines.push('');
// 交易建议
if (p.direction !== 'NEUTRAL') {
lines.push('💡 交易建议:');
lines.push(` 方向: ${p.direction === 'UP' ? 'BUY YES' : 'BUY NO'}`);
lines.push(` 止损: $${p.stopLoss.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`);
lines.push(` 止盈: $${p.takeProfit.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`);
lines.push('');
}
// 风险提示
lines.push('⚠️ 风险提示: 仅供参考,不构成投资建议');
lines.push('═'.repeat(60));
return lines.join('\n');
}
async function main() {
const args = process.argv.slice(2);
if (args.length > 0 && args[0] === 'help') {
console.log(`
╔════════════════════════════════════════════════════════╗
║ BTC 短线预测器 - 15分钟级别涨跌预测 ║
║ 每次调用 0.005 USDT ║
╚════════════════════════════════════════════════════════╝
用法: node predict.js [命令]
命令:
(无参数) 获取当前预测
history 查看历史战绩(开发中)
auto 自动模式(开发中)
示例:
node predict.js
💰 支付: BNB Chain USDT,最低充值 8 USDT
`);
process.exit(0);
}
const userId = 'user_' + Date.now();
// 扣费
console.log('\n⏳ 检查余额并扣费...');
const chargeResult = await chargeUser(userId, SKILL_PRICE);
if (!chargeResult.ok) {
console.log('\n❌ 余额不足');
console.log(`当前余额: ${chargeResult.balance} USDT`);
console.log('\n💳 请充值后继续:');
const paymentUrl = await getPaymentLink(userId, 8);
console.log(paymentUrl);
process.exit(1);
}
console.log(`✅ 扣费成功 (${SKILL_PRICE} USDT)\n`);
try {
// 获取数据
console.log('📊 获取BTC数据...');
const klines = await getKlines('15m', 50);
const ticker = await get24hTicker();
// 预测
const prediction = predict(klines);
// 输出
console.log('\n' + formatPrediction(prediction));
// 24小时行情
console.log('\n📈 24小时行情:');
console.log(` 最高: $${ticker.highPrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`);
console.log(` 最低: $${ticker.lowPrice.toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}`);
console.log(` 涨跌: ${ticker.priceChangePercent > 0 ? '+' : ''}${ticker.priceChangePercent.toFixed(2)}%`);
console.log(` 成交量: ${(ticker.quoteVolume / 1e9).toFixed(2)}B USDT`);
} catch (error) {
console.error('❌ 错误:', error.message);
process.exit(1);
}
}
main().catch(err => {
console.error('❌ 错误:', err.message);
process.exit(1);
});
```
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### _meta.json
```json
{
"owner": "ffffff9331",
"slug": "btc-shortterm-predictor",
"displayName": "BTC短线预测",
"latest": {
"version": "1.0.0",
"publishedAt": 1772692700167,
"commit": "https://github.com/openclaw/skills/commit/cdf5b483e4db9592ab18ed00aa83bae8278f5726"
},
"history": []
}
```
### scripts/binance.js
```javascript
/**
* BTC价格数据获取
* 使用Binance API(免费,无需API Key)
*/
const BINANCE_API = 'https://api.binance.com';
/**
* 获取BTC当前价格
*/
async function getCurrentPrice() {
const url = `${BINANCE_API}/api/v3/ticker/price?symbol=BTCUSDT`;
const resp = await fetch(url);
const data = await resp.json();
return parseFloat(data.price);
}
/**
* 获取K线数据
* @param {string} interval - K线周期: 1m, 5m, 15m, 1h, 4h, 1d
* @param {number} limit - 返回数量
*/
async function getKlines(interval = '15m', limit = 50) {
const url = `${BINANCE_API}/api/v3/klines?symbol=BTCUSDT&interval=${interval}&limit=${limit}`;
const resp = await fetch(url);
const data = await resp.json();
return data.map(k => ({
openTime: k[0],
open: parseFloat(k[1]),
high: parseFloat(k[2]),
low: parseFloat(k[3]),
close: parseFloat(k[4]),
volume: parseFloat(k[5]),
closeTime: k[6]
}));
}
/**
* 获取24小时行情
*/
async function get24hTicker() {
const url = `${BINANCE_API}/api/v3/ticker/24hr?symbol=BTCUSDT`;
const resp = await fetch(url);
const data = await resp.json();
return {
priceChange: parseFloat(data.priceChange),
priceChangePercent: parseFloat(data.priceChangePercent),
volume: parseFloat(data.volume),
quoteVolume: parseFloat(data.quoteVolume),
highPrice: parseFloat(data.highPrice),
lowPrice: parseFloat(data.lowPrice)
};
}
module.exports = {
getCurrentPrice,
getKlines,
get24hTicker
};
```
### scripts/indicators.js
```javascript
/**
* 技术指标计算
*/
/**
* 计算RSI(相对强弱指数)
* @param {number[]} prices - 收盘价数组
* @param {number} period - 周期(默认14)
*/
function calculateRSI(prices, period = 14) {
if (prices.length < period + 1) {
return null;
}
let gains = 0;
let losses = 0;
// 计算初始平均涨跌
for (let i = 1; i <= period; i++) {
const change = prices[i] - prices[i - 1];
if (change > 0) {
gains += change;
} else {
losses -= change;
}
}
let avgGain = gains / period;
let avgLoss = losses / period;
// 计算RSI
for (let i = period + 1; i < prices.length; i++) {
const change = prices[i] - prices[i - 1];
if (change > 0) {
avgGain = (avgGain * (period - 1) + change) / period;
avgLoss = (avgLoss * (period - 1)) / period;
} else {
avgGain = (avgGain * (period - 1)) / period;
avgLoss = (avgLoss * (period - 1) - change) / period;
}
}
if (avgLoss === 0) {
return 100;
}
const rs = avgGain / avgLoss;
return 100 - (100 / (1 + rs));
}
/**
* 计算EMA(指数移动平均)
* @param {number[]} prices - 价格数组
* @param {number} period - 周期
*/
function calculateEMA(prices, period) {
if (prices.length < period) {
return null;
}
const multiplier = 2 / (period + 1);
let ema = prices.slice(0, period).reduce((a, b) => a + b) / period;
for (let i = period; i < prices.length; i++) {
ema = (prices[i] - ema) * multiplier + ema;
}
return ema;
}
/**
* 计算MACD
* @param {number[]} prices - 价格数组
* @returns {Object} { macd, signal, histogram }
*/
function calculateMACD(prices) {
if (prices.length < 26) {
return null;
}
const ema12 = [];
const ema26 = [];
const macdLine = [];
// 计算EMA12
let e12 = prices.slice(0, 12).reduce((a, b) => a + b) / 12;
for (let i = 12; i < prices.length; i++) {
e12 = (prices[i] - e12) * (2 / 13) + e12;
ema12.push(e12);
}
// 计算EMA26
let e26 = prices.slice(0, 26).reduce((a, b) => a + b) / 26;
for (let i = 26; i < prices.length; i++) {
e26 = (prices[i] - e26) * (2 / 27) + e26;
ema26.push(e26);
}
// 计算MACD线
for (let i = 0; i < ema26.length; i++) {
macdLine.push(ema12[i + 14] - ema26[i]);
}
// 计算信号线(MACD的9日EMA)
const signal = calculateEMA(macdLine.slice(-12), 9);
const macd = macdLine[macdLine.length - 1];
return {
macd,
signal,
histogram: macd - signal,
trend: macd > signal ? 'bullish' : 'bearish'
};
}
/**
* 计算布林带
* @param {number[]} prices - 价格数组
* @param {number} period - 周期(默认20)
* @param {number} stdDev - 标准差倍数(默认2)
*/
function calculateBollingerBands(prices, period = 20, stdDev = 2) {
if (prices.length < period) {
return null;
}
const recent = prices.slice(-period);
const sma = recent.reduce((a, b) => a + b) / period;
const variance = recent.reduce((sum, p) => sum + Math.pow(p - sma, 2), 0) / period;
const std = Math.sqrt(variance);
return {
upper: sma + (std * stdDev),
middle: sma,
lower: sma - (std * stdDev),
currentPrice: prices[prices.length - 1],
position: prices[prices.length - 1] > sma ? 'above' : 'below'
};
}
/**
* 计算价格动量
* @param {number[]} prices - 价格数组
* @param {number} period - 周期
*/
function calculateMomentum(prices, period = 10) {
if (prices.length < period + 1) {
return null;
}
const current = prices[prices.length - 1];
const previous = prices[prices.length - 1 - period];
return {
value: current - previous,
percent: ((current - previous) / previous) * 100
};
}
/**
* 综合预测
* @param {Object[]} klines - K线数据
*/
function predict(klines) {
const closes = klines.map(k => k.close);
const currentPrice = closes[closes.length - 1];
// 计算指标
const rsi = calculateRSI(closes);
const macd = calculateMACD(closes);
const boll = calculateBollingerBands(closes);
const momentum = calculateMomentum(closes, 5);
// 计算成交量变化
const recentVolume = klines.slice(-3).map(k => k.volume);
const avgVolume = klines.slice(-10).reduce((sum, k) => sum + k.volume, 0) / 10;
const volumeChange = ((recentVolume[2] - avgVolume) / avgVolume) * 100;
// 综合评分
let bullishScore = 0;
let bearishScore = 0;
const signals = [];
// RSI判断
if (rsi < 30) {
bullishScore += 2;
signals.push({ indicator: 'RSI', value: rsi.toFixed(1), signal: '超卖 → 看涨', bullish: true });
} else if (rsi > 70) {
bearishScore += 2;
signals.push({ indicator: 'RSI', value: rsi.toFixed(1), signal: '超买 → 看跌', bullish: false });
} else if (rsi > 50) {
bullishScore += 1;
signals.push({ indicator: 'RSI', value: rsi.toFixed(1), signal: '偏多 → 看涨', bullish: true });
} else {
bearishScore += 1;
signals.push({ indicator: 'RSI', value: rsi.toFixed(1), signal: '偏空 → 看跌', bullish: false });
}
// MACD判断
if (macd.histogram > 0 && macd.histogram > macd.macd * 0.1) {
bullishScore += 2;
signals.push({ indicator: 'MACD', value: '金叉', signal: '多头动能 → 看涨', bullish: true });
} else if (macd.histogram < 0) {
bearishScore += 2;
signals.push({ indicator: 'MACD', value: '死叉', signal: '空头动能 → 看跌', bullish: false });
} else {
signals.push({ indicator: 'MACD', value: '震荡', signal: '方向不明', bullish: null });
}
// 布林带判断
if (currentPrice < boll.lower * 1.01) {
bullishScore += 2;
signals.push({ indicator: 'BOLL', value: '触及下轨', signal: '反弹信号 → 看涨', bullish: true });
} else if (currentPrice > boll.upper * 0.99) {
bearishScore += 1;
signals.push({ indicator: 'BOLL', value: '触及上轨', signal: '回调风险', bullish: false });
} else {
signals.push({ indicator: 'BOLL', value: '中轨附近', signal: '震荡', bullish: null });
}
// 成交量判断
if (volumeChange > 20) {
if (momentum.value > 0) {
bullishScore += 1;
signals.push({ indicator: 'Volume', value: `+${volumeChange.toFixed(0)}%`, signal: '放量上涨 → 看涨', bullish: true });
} else {
bearishScore += 1;
signals.push({ indicator: 'Volume', value: `+${volumeChange.toFixed(0)}%`, signal: '放量下跌 → 看跌', bullish: false });
}
} else {
signals.push({ indicator: 'Volume', value: `${volumeChange.toFixed(0)}%`, signal: '成交量正常', bullish: null });
}
// 最终预测
const totalScore = bullishScore + bearishScore;
const confidence = totalScore > 0 ? Math.max(bullishScore, bearishScore) / totalScore : 0.5;
const prediction = {
direction: bullishScore > bearishScore ? 'UP' : (bearishScore > bullishScore ? 'DOWN' : 'NEUTRAL'),
confidence: Math.min(confidence * 100, 95),
bullishScore,
bearishScore,
signals,
indicators: {
rsi,
macd: macd.histogram,
bollinger: boll,
momentum,
volumeChange
},
currentPrice,
stopLoss: bullishScore > bearishScore ? currentPrice * 0.997 : currentPrice * 1.003,
takeProfit: bullishScore > bearishScore ? currentPrice * 1.008 : currentPrice * 0.992
};
return prediction;
}
module.exports = {
calculateRSI,
calculateEMA,
calculateMACD,
calculateBollingerBands,
calculateMomentum,
predict
};
```
### scripts/skillpay.js
```javascript
/**
* SkillPay Billing Integration
* 收费接口 - 每次调用扣费 0.005 USDT
*/
const BILLING_API_URL = 'https://skillpay.me';
const BILLING_API_KEY = process.env.SKILLPAY_API_KEY || 'sk_a267a27a1eb8381a762a9a6cdb1ea7d722f9f45f345b7319cfd3cccd9fae35c5';
const SKILL_ID = '0525333e-9ef5-4c67-ac65-1463a8ca3d65'; // BTC短线预测
/**
* 扣费
*/
async function chargeUser(userId, amount = 0.005) {
if (process.env.SKILLPAY_DEV === 'true') {
console.log('⚠️ 开发模式:跳过扣费');
return { ok: true, balance: 999 };
}
const resp = await fetch(`${BILLING_API_URL}/api/v1/billing/charge`, {
method: 'POST',
headers: {
'X-API-Key': BILLING_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
user_id: userId,
skill_id: SKILL_ID,
amount: amount,
}),
});
const data = await resp.json();
if (data.success) {
return { ok: true, balance: data.balance };
}
return {
ok: false,
balance: data.balance,
paymentUrl: data.payment_url
};
}
/**
* 生成充值链接
*/
async function getPaymentLink(userId, amount = 8) {
const resp = await fetch(`${BILLING_API_URL}/api/v1/billing/payment-link`, {
method: 'POST',
headers: {
'X-API-Key': BILLING_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
user_id: userId,
amount,
}),
});
const data = await resp.json();
return data.payment_url;
}
module.exports = {
chargeUser,
getPaymentLink,
SKILL_PRICE: 0.005
};
```