A sophisticated cryptocurrency trading system built for Binance, featuring real-time market data analysis and AI-driven trading decisions. The system focuses on the TRUMP/USDC trading pair with automated trade execution and risk management.
Core trading component that:
- Places and monitors orders
- Manages positions
- Handles API interactions
- Implements safety checks and error handling
Real-time market data collection and analysis:
- WebSocket price streams
- Order book monitoring
- Volume tracking
- Technical indicators
Trading state and position management:
- Order state tracking
- Position management
- Trade recording
- Balance monitoring
Comprehensive test suite including:
- Production cycle testing
- WebSocket connectivity
- Order management
- Trading rules verification
- Profit calculation
- Python 3.8+
- Binance API keys
- OpenRouter API key (for AI recommendations)
- Clone the repository
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables in
.env
:
BINANCE_TRADE_API_KEY=your_binance_api_key
BINANCE_TRADE_API_SECRET=your_binance_api_secret
OPENROUTER_API_KEY=your_openrouter_api_key
Start with basic functionality tests:
python src/test_apis.py # Test API connections
python src/test_market_data.py # Test market data service
python src/test_websocket.py # Test WebSocket connections
python src/check_trading_rules.py # Verify trading rules
Then proceed to trading tests:
python src/test_production_cycle.py --dry-run # Test full trading cycle without real orders
The system operates with several interconnected components:
-
Core Services
- Trading Engine: Order execution and management
- Market Data Service: Real-time data collection
- State Manager: Trading state and position tracking
-
Testing & Utilities
- Production cycle testing
- WebSocket connectivity
- Order management
- Profit calculation
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.