用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tools-only/X-Skills --skill openbb-crypto命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
基于 SOC 职业分类
正在显示 SKILL.md
| name | openbb-crypto |
| description | Cryptocurrency market analysis using OpenBB - price data, on-chain metrics,... |
Comprehensive cryptocurrency analysis using OpenBB Platform's crypto data sources.
/openbb-crypto SYMBOL [--vs USD|BTC|ETH] [--metrics on-chain|defi|social] [--period 30d]
Analyzes cryptocurrency markets with price data, on-chain metrics, DeFi analytics, and sentiment analysis.
from openbb import obb
import pandas as pd
from datetime import datetime, timedelta
# Parse arguments
symbol = sys.argv[1].upper() if len(sys.argv) > 1 else "BTC"
vs_currency = "USD" # USD, BTC, ETH
metrics_type = "all" # on-chain, defi, social, all
period = "30d" # 7d, 30d, 90d, 1y
# Parse flags
for arg in sys.argv[2:]:
if arg.startswith("--vs="):
vs_currency = arg.split("=")[1].upper()
elif arg.startswith("--metrics="):
metrics_type = arg.split("=")[1]
elif arg.startswith("--period="):
period = arg.split("=")[1]
# Get historical crypto prices
crypto_data = obb.crypto.price.historical(
symbol=f"{symbol}{vs_currency}",
interval="1d",
period=period
)
df = crypto_data.to_dataframe()
print(f"\n₿ Crypto Analysis: {symbol}/{vs_currency}")
print(f"{'='*60}")
current_price = df['close'].iloc[-1]
period_high = df['high'].max()
period_low = df['low'].min()
period_return = ((current_price / df['close'].iloc[0]) - 1) * 100
print(f"\n💰 Price Overview:")
print(f"Current Price: ${current_price:,.2f}")
print(f"{period} High: ${period_high:,.2f}")
print(f"{period} Low: ${period_low:,.2f}")
print(f"{period} Return: {period_return:+.2f}%")
print(f"24h Volume: ${df['volume'].iloc[-1]:,.0f}")
# Calculate crypto-specific indicators
print(f"\n📊 Technical Indicators:")
# Moving averages
df['MA_7'] = df['close'].rolling(window=7).mean()
df['MA_30'] = df['close'].rolling(window=30).mean()
df['MA_90'] = df['close'].rolling(window=90).mean()
ma_7 = df['MA_7'].iloc[-1]
ma_30 = df['MA_30'].iloc[-1]
ma_90 = df['MA_90'].iloc[-1]
print(f"MA 7: ${ma_7:,.2f} {'🟢' if current_price > ma_7 else '🔴'}")
print(f"MA 30: ${ma_30:,.2f} {'🟢' if current_price > ma_30 else '🔴'}")
print(f"MA 90: ${ma_90:,.2f} {'🟢' if current_price > ma_90 else '🔴'}")
# Volatility
returns = df['close'].pct_change()
volatility = returns.std() * (365 ** 0.5) * 100 # Annualized
print(f"\nVolatility (ann.): %")
delta = df[].diff()
gain = delta.where(delta > , ).rolling(window=).mean()
loss = -delta.where(delta < , ).rolling(window=).mean()
rs = gain / loss
df[] = - ( / ( + rs))
rsi = df[].iloc[-]
()
rsi > :
()
rsi < :
()
if metrics_type in ["on-chain", "all"]:
print(f"\n⛓️ On-Chain Metrics:")
try:
# Network activity
network_data = obb.crypto.onchain.active_addresses(symbol=symbol)
print(f"Active Addresses (24h): {network_data.active_addresses:,}")
print(f"Transaction Count: {network_data.tx_count:,}")
print(f"Transaction Volume: ${network_data.tx_volume:,.0f}")
# Hash rate (for PoW coins)
if symbol in ["BTC", "ETH", "LTC", "DOGE"]:
hash_data = obb.crypto.onchain.hashrate(symbol=symbol)
print(f"\nHash Rate: {hash_data.hashrate / 1e18:.2f} EH/s")
print(f"Mining Difficulty: {hash_data.difficulty:,.0f}")
# Holder distribution
holders = obb.crypto.onchain.holders(symbol=symbol)
print(f"\nTop 10 Holders: {holders.top_10_pct:.1f}%")
print(f"Top 100 Holders: {holders.top_100_pct:.1f}%")
except Exception as e:
print(f"On-chain data not available for ")
if metrics_type in ["defi", "all"] and symbol in ["ETH", "BNB", "AVAX", "SOL"]:
print(f"\n🏦 DeFi Metrics:")
try:
defi_data = obb.crypto.defi.tvl(chain=symbol)
print(f"Total Value Locked: ${defi_data.tvl / 1e9:.2f}B")
print(f"Protocol Count: {defi_data.protocol_count}")
print(f"Top Protocol: {defi_data.top_protocol}")
print(f" - TVL: ${defi_data.top_protocol_tvl / 1e9:.2f}B")
# Staking data
staking = obb.crypto.defi.staking(symbol=symbol)
print(f"\nStaking:")
print(f"Total Staked: {staking.total_staked_pct:.1f}%")
print(f"Avg APY: {staking.avg_apy:.2f}%")
except:
print(f"DeFi data not available for {symbol}")
if metrics_type in ["social", "all"]:
print(f"\n📱 Social Sentiment:")
try:
social_data = obb.crypto.social.sentiment(symbol=symbol)
print(f"Twitter Mentions (24h): {social_data.twitter_mentions:,}")
print(f"Reddit Posts (24h): {social_data.reddit_posts:,}")
print(f"Sentiment Score: {social_data.sentiment_score:.2f}/5.0")
sentiment_emoji = "🟢" if social_data.sentiment_score > 3.5 else "🟡" if social_data.sentiment_score > 2.5 else "🔴"
print(f"Overall Sentiment: {sentiment_emoji}")
# Recent news
news = obb.crypto.news(symbol=symbol, limit=3)
print(f"\n📰 Latest News:")
for i, article in enumerate(news[:3], 1):
print(f"{i}. {article.title}")
print(f" {article.source} - {article.published_date}")
except:
print("Social/news data not available")
print(f"\n🐋 Whale Activity (Large Transfers):")
try:
# Get large transactions (>$100k)
whales = obb.crypto.onchain.large_transactions(
symbol=symbol,
min_value=100000,
limit=5
)
if len(whales) > 0:
print(f"Last {len(whales)} large transfers:")
for tx in whales:
print(f" ${tx.value_usd:,.0f} - {tx.from_address[:10]}...→ {tx.to_address[:10]}...")
print(f" {tx.timestamp} ({tx.exchange if tx.exchange else 'Unknown'})")
else:
print("No significant whale activity detected")
except:
print("Whale tracking not available")
print(f"\n🤖 AI Market Analysis for {symbol}:")
print(f"\n📈 Trend Analysis:")
# Determine trend
if current_price > ma_7 > ma_30 > ma_90:
trend = "Strong Uptrend"
trend_emoji = "🚀"
elif current_price > ma_30:
trend = "Bullish"
trend_emoji = "📈"
elif current_price < ma_7 < ma_30 < ma_90:
trend = "Strong Downtrend"
trend_emoji = "📉"
else:
trend = "Consolidating"
trend_emoji = "↔️"
print(f"{trend_emoji} Market Trend: {trend}")
# Risk assessment
if volatility > 100:
risk = "Very High"
risk_emoji = "🔴"
elif volatility > 60:
risk = "High"
risk_emoji = "🟡"
else:
risk = "Moderate"
risk_emoji = "🟢"
print(f"{risk_emoji} Volatility Risk: {risk}")
# Trading signals
print(f"\n💡 Trading Signals:")
signals = []
if rsi < 30:
signals.append("🟢 RSI oversold - potential buy zone")
if rsi > 70:
signals.append("🔴 RSI overbought - consider taking profits")
if current_price > ma_30 returns.iloc[-] > :
signals.append()
df[].iloc[-] > df[].rolling().mean().iloc[-] * :
signals.append()
signals:
signal signals:
()
:
()
print(f"\n🎯 Key Levels:")
# Calculate support and resistance
high_30d = df['high'].tail(30).max()
low_30d = df['low'].tail(30).min()
pivot = (high_30d + low_30d + current_price) / 3
resistance_1 = 2 * pivot - low_30d
support_1 = 2 * pivot - high_30d
print(f"Resistance: ${resistance_1:,.2f} ({((resistance_1/current_price - 1) * 100):+.1f}%)")
print(f"Current: ${current_price:,.2f}")
print(f"Support: ${support_1:,.2f} ({((support_1/current_price - 1) * 100):+.1f}%)")
/openbb-crypto BTC
/openbb-crypto ETH --metrics=defi
/openbb-crypto LINK --vs=BTC --period=90d
/openbb-crypto DOGE --metrics=social
--vs=BTC to see altcoin strength vs Bitcoin# Portfolio tracking
/openbb-portfolio --add-crypto=BTC,ETH,SOL
# Compare with equity markets
/openbb-macro --crypto-correlation
# AI research
/openbb-research --crypto --symbol=BTC