Intelligent cryptocurrency trading bot that uses Binance API and specialized GPT models to make data-driven trading decisions in real-time.
- 🤖 AI-Powered Trading: Integration with custom GPT specialized in trading strategies
- 📊 Real-Time Analysis: Live market data processing and decision-making
- 📈 Multiple Strategies: Support for various trading strategies (scalping, swing, day trading)
- ⚡ Fast Execution: Automated order placement with minimal latency
- 🔒 Secure: API key encryption and secure credential management
- 📉 Risk Management: Built-in stop-loss, take-profit, and position sizing
- 📊 Portfolio Tracking: Real-time portfolio performance monitoring
- 💬 Notifications: Alert system for trades and important events
- Python 3.8 or higher
- Binance account with API access
- OpenAI API key (for GPT trading advisor)
git clone https://github.com/murdok1982/BotBinanceIA.git
cd BotBinanceIApython -m venv venv
# On Windows
venv\Scripts\activate
# On Linux/Mac
source venv/bin/activatepip install -r requirements.txtcp .env.example .env
# Edit .env with your API keysCreate a .env file:
BINANCE_API_KEY=your_binance_api_key
BINANCE_SECRET_KEY=your_binance_secret_key
OPENAI_API_KEY=your_openai_api_key
TRADING_MODE=testnet # or 'live'python main.pyfrom trading.bot import TradingBot
from models.ai_advisor import GPTTradingAdvisor
from utils.binance_client import BinanceClient
# Initialize components
bot = TradingBot()
ai_advisor = GPTTradingAdvisor()
# Start trading
bot.start()
# Monitor performance
performance = bot.get_performance()
print(f"Total Profit: {performance['total_profit']}%")
print(f"Win Rate: {performance['win_rate']}%")The bot uses a custom-trained GPT model that:
- Analyzes market trends and patterns
- Provides trading signals based on technical and fundamental analysis
- Adapts to changing market conditions
- Learns from historical performance
strategy = MomentumStrategy(
lookback_period=20,
momentum_threshold=0.02
)strategy = MeanReversionStrategy(
bb_period=20,
bb_std=2.0
)strategy = GridStrategy(
grid_levels=10,
grid_spacing=0.01
)| Strategy | Description | Risk Level | Best For |
|---|---|---|---|
| Scalping | Quick trades, small profits | High | High volatility |
| Day Trading | Intraday positions | Medium | Trending markets |
| Swing | Multi-day positions | Medium | Volatile markets |
| Grid | Buy low, sell high in range | Low | Sideways markets |
| Momentum | Follow the trend | Medium | Trending markets |
| Mean Reversion | Buy oversold, sell overbought | Medium | Range-bound markets |
- Never commit API keys to version control
- Use API key restrictions on Binance (IP whitelist, trading only)
- Start with testnet before going live
- Enable 2FA on your Binance account
- Use separate API keys for bot trading
- Monitor bot activity regularly
- Set conservative risk limits initially
Required Binance API permissions:
- ✅ Enable Reading
- ✅ Enable Spot & Margin Trading
- ❌ Disable Withdrawals
- ❌ Disable Internal Transfer
# Example performance output
Performance Summary (Last 30 days):
=====================================
Total Trades: 156
Win Rate: 58.3%
Profit Factor: 1.85
Total Return: 12.4%
Sharpe Ratio: 1.92
Max Drawdown: -3.2%
Average Trade Duration: 2.3 hours
Best Trade: +4.8%
Worst Trade: -1.9%IMPORTANT: Trading cryptocurrencies carries significant risk.
- This bot is provided for educational purposes
- Past performance does not guarantee future results
- You can lose your entire investment
- Always test with small amounts first
- Use testnet before going live
- Never invest more than you can afford to lose
- The authors are not responsible for any financial losses
┌─────────────────────────────────────┐
│ ₿ BTC Donation Address ₿ │
├─────────────────────────────────────┤
│ │
│ bc1qqphwht25vjzlptwzjyjt3sex │
│ 7e3p8twn390fkw │
│ │
│ Network: Bitcoin (BTC) │
│ Scan QR ↓ │
└─────────────────────────────────────┘
Address: bc1qqphwht25vjzlptwzjyjt3sex7e3p8twn390fkw
Your donations help maintain and improve this trading bot! 🙏
Contributions are welcome! Please:
- Fork the repository
- Create feature branch (
git checkout -b feature/NewFeature) - Commit changes (
git commit -m 'Add NewFeature') - Push to branch (
git push origin feature/NewFeature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
murdok1982
- GitHub: @murdok1982
- LinkedIn: Gustavo Lobato Clara
- Email: gustavolobatoclara@gmail.com
- Binance API - Cryptocurrency exchange API
- OpenAI GPT - AI trading advisor
- python-binance - Python Binance API wrapper
- The crypto trading community
- Add support for Binance Futures
- Implement more trading strategies
- Add web dashboard for monitoring
- Implement backtesting framework
- Add support for multiple exchanges
- Implement paper trading mode
- Add Telegram bot integration
- Machine learning model for price prediction
⭐ Star this repo if you find it useful! 🐛 Report bugs 💡 Request features
Happy Trading! 📈