A comprehensive cryptocurrency trading analysis system integrating technical analysis, machine learning, sentiment analysis, on-chain metrics, and AI-driven strategy generation.
Crypto Oracle is a powerful trading analysis system designed to help traders make more informed decisions by combining multiple data sources and analytical approaches:
- Technical Analysis: Comprehensive indicators including RSI, MACD, Bollinger Bands, and more
- Machine Learning: LSTM neural networks for price forecasting and GARCH models for volatility prediction
- Multi-Timeframe Analysis: Examining patterns across different timeframes (1h, 4h, 1d)
- Sentiment Analysis: Social media, news, and market sentiment integration
- On-Chain Metrics: Blockchain data analysis for supported cryptocurrencies
- GPT-Powered Strategy Generation: AI-generated trading strategies based on comprehensive market data
- Backtesting: Historical performance validation of trading strategies
- Portfolio Management: Position tracking and risk management
- Fetch and analyze crypto data from major exchanges
- Compute 20+ technical indicators
- Multi-timeframe analysis to identify trends across different time periods
- Identify support/resistance levels and market phases
- Market scanning to discover trading opportunities
- LSTM price prediction with confidence scoring
- GARCH volatility modeling
- Value at Risk (VaR) calculations
- Automated model caching for improved performance
- Social media sentiment from Twitter, Reddit, and more
- News sentiment analysis and aggregation
- Fear & Greed Index integration
- On-chain metrics for major cryptocurrencies
- Exchange inflow/outflow monitoring
- AI-driven strategy creation using GPT-4
- Entry, exit, stop-loss, and take-profit recommendations
- Position sizing suggestions based on risk parameters
- Strategy confidence scoring
- Historical performance testing
- Strategy quality scoring
- Risk/reward evaluation
- Win rate, profit factor, and drawdown analysis
- Position tracking and performance monitoring
- Risk management
- Portfolio performance statistics
- Python 3.8+
- Required packages (install via pip):
pip install -r requirements.txt
-
Create a
.envfile with the following variables:# Exchange API keys BINANCE_API_KEY=your_binance_api_key BINANCE_API_SECRET=your_binance_api_secret # OpenAI API key for GPT-4 integration OPENAI_API_KEY=your_openai_api_key # Optional: For sentiment and on-chain metrics ENABLE_SENTIMENT=true ENABLE_ONCHAIN=true TWITTER_BEARER_TOKEN=your_twitter_token GLASSNODE_API_KEY=your_glassnode_key CRYPTOQUANT_API_KEY=your_cryptoquant_key -
Customize settings in the configuration section of the main script if needed.
Run the API server to access all functionality via REST endpoints:
python crypto_oracle.py api --port 8000Analyze a specific cryptocurrency:
python crypto_oracle.py analyze BTC/USDT --timeframes 1h 4h 1dScan the market for opportunities:
python crypto_oracle.py scan --max-symbols 30 --min-confidence 0.7| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API information |
/tickers |
GET | Available trading pairs |
/timeframes |
GET | Available timeframes |
/analyze |
POST | Full analysis for a symbol |
/scan |
POST | Market scan for opportunities |
/sentiment/{symbol} |
GET | Sentiment data for a symbol |
/onchain/{symbol} |
GET | On-chain metrics for a symbol |
/backtest |
POST | Backtest a strategy |
/status |
GET | System status |
Analyzing Bitcoin:
import requests
import json
response = requests.post('http://localhost:8000/analyze', json={
'symbol': 'BTC/USDT',
'timeframes': ['1h', '4h', '1d'],
'lookback': 1000,
'include_sentiment': True,
'include_onchain': True
})
result = response.json()
print(json.dumps(result, indent=2))
# Access the strategy recommendation
strategy = result['data']['strategy']
print(f"Trade direction: {strategy['trade_direction']}")
print(f"Entry price: {strategy['optimal_entry']}")
print(f"Confidence score: {strategy['confidence_score']}")- CCXT: Exchange connectivity
- TensorFlow: Machine learning models
- FastAPI: API server
- Pandas/NumPy: Data processing
- TA-Lib (optional): Technical indicators
- OpenAI: GPT strategy generation
This software is for educational and research purposes only. It is not financial advice, and you should not make trading or investment decisions based solely on its output. Always do your own research and consult with a qualified financial advisor before trading.
MIT License