A comprehensive multi-agent AI system for cryptocurrency trading analysis that combines technical analysis, news sentiment, and market research to provide actionable trading decisions for crypto futures markets.
This project implements a sophisticated trading workflow using multiple specialized AI agents that work together to analyze cryptocurrency markets and generate trading recommendations. The system analyzes BTC and altcoins using technical indicators, news sentiment, and fundamental analysis to provide Long/Short/Hold recommendations with specific entry, stop loss, and take profit levels.
- Multi-Agent Architecture: Specialized agents for different aspects of market analysis
- BTC-First Analysis: BTC market analysis as the foundation for altcoin trading decisions
- Technical Analysis: Integration with Binance Futures and technical indicators (RSI, MACD, EMA, SMA, etc.)
- News & Sentiment Analysis: Real-time news aggregation and sentiment analysis
- Debate-Based Decision Making: Bull, Bear, and Neutral researchers debate before final decision
- Risk Management: Comprehensive risk assessment with leverage recommendations
- RESTful API: Flask-based API server for market data and technical indicators
User Request → @market_analyst_btc → market_analyst → news_analyst →
bear_researcher → bull_researcher → neutral_researcher → research_manager → trader
┌─────────────────────┐
│ User Request │
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ @market_analyst_btc │ → BTC Market Report
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ market_analyst │ → Market Report (for altcoins)
└──────────┬──────────┘
│
▼
┌─────────────────────┐
│ news_analyst │ → News Report
└──────────┬──────────┘
│
├─────────────────┬─────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ bear_researcher │ │ bull_researcher │ │neutral_researcher│
│ (Short case) │ │ (Long case) │ │ (Hold case) │
└────────┬─────────┘ └────────┬─────────┘ └────────┬─────────┘
│ │ │
└────────────────────┼────────────────────┘
▼
┌──────────────────┐
│ research_manager │ → Investment Plan
└────────┬─────────┘
▼
┌──────────────────┐
│ trader │ → Trading Decision
└──────────────────┘
- Python 3.8+
- pip
- API keys (optional, for advanced features):
- TAAPI.io secret (for technical indicators)
-
Clone the repository
git clone https://github.com/eternalai-org/agent-trading.git cd agent-trading -
Create and activate virtual environment
# Create virtual environment python -m venv venv # Activate virtual environment # On macOS/Linux: source venv/bin/activate # On Windows: # venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables (optional) Create a
.envfile:TAAPI_SECRET=your_taapi_secret
-
Start the API server
python server.py
The server will start on
http://127.0.0.1:5000by default.
Test the health endpoint:
curl http://127.0.0.1:5000/healthExpected response:
{"status": "ok"}In Cursor/Claude IDE, use the /trading command to analyze any cryptocurrency:
/trading Should I long or short BTC right now?
The server can be configured via command-line arguments:
python server.py --port 5000 --host 127.0.0.1TAAPI_SECRET: API secret for TAAPI.io technical indicators
The system provides comprehensive trading recommendations including:
- Position Direction: LONG / SHORT / HOLD
- Entry Price: Specific entry levels with rationale
- Stop Loss: Risk management levels
- Take Profit: Multiple TP levels (TP1, TP2, TP3)
- Leverage Recommendation: Appropriate leverage (10x-50x)
- Risk/Reward Ratio: Calculated R:R ratios
- Confidence Level: High / Medium / Low
- Market Analysis: Technical, sentiment, and fundamental analysis
The system emphasizes proper risk management:
- Position sizing: 1-2% risk per trade
- Stop loss placement: Below key support/resistance
- Leverage recommendations: Based on volatility and trend strength
- Multiple take profit levels: Scale out of positions
- BTC correlation analysis: Consider market leader impact
IMPORTANT: This AI system provides educational analysis only. It is NOT financial advice.
- Cryptocurrency trading involves significant risk
- Leverage amplifies both gains and losses
- Past performance doesn't guarantee future results
- Always use proper risk management
- Consult a licensed financial advisor
- Do your own research (DYOR)
- Never trade with money you can't afford to lose
Contributions are welcome! Please feel free to submit a Pull Request.
[Add your license here]
For issues, questions, or contributions, please open an issue on the repository.
Built with ❤️ for the crypto trading community