# ๐ค GeneBot - Advanced Multi-Market Trading Bot
[](https://python.org)
[](LICENSE)
[](https://github.com/genebot/genebot)
[](https://github.com/genebot/genebot/releases)
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ
โ โโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโ โโโโโโโโโโ
โ โโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ โโโโโโโโโโ โโโโโโ โโโโโโโโโ โโโโโโโโโโโ โโโ โโโ โ
โ โโโ โโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโ โโโ โโโ โ
โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโ โ
โ โโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโ โโโ โ
โ โ
โ Advanced Multi-Market Trading Bot โ
โ Version 1.1.9 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
**GeneBot** is a sophisticated, multi-market trading bot that supports both cryptocurrency exchanges and forex brokers. Built with advanced risk management, comprehensive strategy orchestration, and real-time monitoring capabilities.
## ๐ What's New in v1.1.9
### ๐ง Critical Bug Fixes & Improvements
- **โ
Fixed Import Issues**: Resolved module import errors that prevented the bot from starting
- **๐๏ธ Enhanced Package Structure**: Added missing `markets`, `analysis`, and `data` modules to the package
- **๐ Improved Cross-Market Support**: Better integration between crypto and forex trading modules
- **๐ ๏ธ Streamlined Installation**: Simplified PyPI installation with all dependencies properly configured
- **๐ฆ Better Module Organization**: Reorganized package structure for improved maintainability
### ๐ Enhanced Stability
- **๐ Robust Error Handling**: Improved exception handling across all trading modules
- **๐ Better Validation**: Enhanced account and configuration validation
- **๐ Improved Logging**: More detailed logging for troubleshooting and monitoring
- **โก Performance Optimizations**: Faster startup times and reduced memory usage
## ๐ Key Features
### ๐ Multi-Market Trading
- **Crypto Exchanges**: Binance, Coinbase, Kraken, KuCoin, Bybit
- **Forex Brokers**: OANDA, MetaTrader 5, Interactive Brokers
- **Cross-Market Arbitrage**: Exploit price differences across markets
- **Unified Portfolio Management**: Manage positions across all markets
### ๐ง Advanced Strategy Engine
- **50+ Built-in Strategies**: Technical indicators, ML patterns, arbitrage
- **Custom Strategy Development**: Easy-to-use strategy framework
- **Multi-Strategy Orchestration**: Run multiple strategies simultaneously
- **Strategy Performance Analytics**: Comprehensive backtesting and analysis
### ๐ก๏ธ Comprehensive Risk Management
- **Real-Time Risk Monitoring**: Position sizing, drawdown protection
- **Cross-Market Risk Assessment**: Correlation analysis and exposure limits
- **Anti-Greed System**: Prevents emotional trading decisions
- **Dynamic Stop-Loss Management**: Adaptive risk controls
### ๐ Enterprise-Grade Security
- **Live API Validation**: Comprehensive credential testing before trading
- **Secure Configuration Management**: Encrypted credential storage
- **Audit Trails**: Complete trading history and compliance reporting
- **Regulatory Compliance**: Built-in compliance frameworks
### ๐ Advanced Analytics & Monitoring
- **Real-Time Dashboards**: Grafana integration with custom metrics
- **Performance Analytics**: Detailed P&L analysis and reporting
- **Alert System**: Email, SMS, and webhook notifications
- **Backtesting Engine**: Historical strategy validation
## ๐ ๏ธ Installation
### Quick Install from PyPI (Recommended)
```bash
# Install GeneBot from PyPI
pip install genebot
# Verify installation
genebot --version
genebot --help
```
### Development Installation
```bash
# Clone the repository
git clone https://github.com/genebot/genebot.git
cd genebot
# Create virtual environment
python3 -m venv genebot-env
source genebot-env/bin/activate
# Install in development mode
pip install -e .
# Install optional features
pip install -e ".[all]" # All features
pip install -e ".[dev]" # Development tools
pip install -e ".[monitoring]" # Monitoring tools
pip install -e ".[ml]" # Machine Learning tools
```
## ๐ Quick Start
### 1. Initialize Your Workspace
```bash
# Initialize GeneBot configuration files and directories
genebot init-config
```
This command creates the following structure:
```
โโโ .env # API credentials and environment settings
โโโ config/
โ โโโ accounts.yaml # Trading account configurations
โ โโโ trading_bot_config.yaml # Trading strategies and settings
โโโ logs/ # Trading logs and system logs
โโโ reports/ # Performance and trading reports
โโโ backups/ # Configuration backups
```
### 2. Configure Environment Settings
Edit the `.env` file created by `init-config`:
```bash
# Open the environment file
nano .env
```
**Environment Configuration Options:**
```bash
# Trading Mode
ENVIRONMENT=development # development, staging, production
PAPER_TRADING=true # true for demo trading, false for live
# Risk Management
MAX_DAILY_LOSS=1000 # Maximum daily loss in USD
MAX_PORTFOLIO_RISK=0.02 # Maximum risk per trade (2%)
PORTFOLIO_VALUE=100000 # Total portfolio value
# Crypto Exchange API (Example: Binance)
BINANCE_API_KEY=your_api_key_here
BINANCE_API_SECRET=your_secret_here
BINANCE_SANDBOX=true # Use sandbox/testnet
# Forex Broker API (Example: OANDA)
OANDA_API_KEY=your_api_key_here
OANDA_ACCOUNT_ID=your_account_id_here
OANDA_SANDBOX=true # Use demo environment
# Notification Settings (Optional)
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_chat_id
EMAIL_NOTIFICATIONS=false
```
### 3. Set Up Demo Accounts (Safe Testing)
```bash
# Set up demo accounts for testing
genebot setup-demo
# List available exchanges and brokers
genebot list-exchanges
genebot list-brokers
# Validate demo accounts
genebot validate
```
### 4. Add Your Trading Accounts
#### Option A: Interactive Account Setup
```bash
# Add crypto exchange account (interactive prompts)
genebot add-crypto binance --mode demo
# Add forex broker account (interactive prompts)
genebot add-forex oanda --mode demo
# List all configured accounts
genebot list
```
#### Option B: Manual Configuration
Edit `config/accounts.yaml`:
```yaml
crypto_exchanges:
binance-demo:
name: 'Binance Demo Account'
exchange_type: 'binance'
api_key: '${BINANCE_API_KEY}'
api_secret: '${BINANCE_API_SECRET}'
sandbox: true
enabled: true
max_position_size: 1000
risk_limit: 0.02
forex_brokers:
oanda-demo:
name: 'OANDA Demo Account'
broker_type: 'oanda'
api_key: '${OANDA_API_KEY}'
account_id: '${OANDA_ACCOUNT_ID}'
sandbox: true
enabled: true
max_position_size: 10000
leverage: 50
```
### 5. Validate Configuration
```bash
# Validate all accounts and configuration
genebot validate
# Validate specific account
genebot validate-accounts
```
### 6. Start Trading
```bash
# Start the trading bot with live API validation
genebot start
# Check bot status
genebot status
# Generate trading reports
genebot report
```
## ๐ Command Reference
### Setup & Configuration
```bash
genebot init-config # Initialize workspace and configuration files
genebot config-help # Show detailed configuration guide
genebot validate # Validate all accounts and configuration
genebot backup-config # Backup current configurations
```
### Account Management
```bash
# List available options
genebot list-exchanges # List supported crypto exchanges
genebot list-brokers # List supported forex brokers
genebot list # List all configured accounts
# Add accounts
genebot add-crypto <exchange> # Add crypto exchange account
genebot add-forex <broker> # Add forex broker account
# Examples:
genebot add-crypto binance --mode demo
genebot add-forex oanda --mode demo
# Edit accounts
genebot edit-crypto <name> # Edit crypto account
genebot edit-forex <name> # Edit forex account
# Remove accounts
genebot remove-account <name> # Remove specific account
genebot remove-all-accounts # Remove all accounts
genebot remove-by-exchange <ex> # Remove by exchange type
genebot remove-by-type <type> # Remove by account type (crypto/forex)
# Account status
genebot enable-account <name> # Enable specific account
genebot disable-account <name> # Disable specific account
genebot validate-accounts # Validate all account credentials
```
### Bot Control
```bash
genebot start # Start trading bot
genebot stop # Stop trading bot
genebot restart # Restart trading bot
genebot status # Show detailed bot status
genebot health-check # Comprehensive system health check
```
### Demo & Testing
```bash
genebot setup-demo # Setup demo accounts for safe testing
genebot cleanup-demo # Remove all demo accounts
```
### Reporting & Analytics
```bash
genebot report # Generate comprehensive trading report
```
### Utilities
```bash
genebot reset # Clean up all data and reset system
genebot --version # Show version information
genebot --help # Show help and available commands
```
## ๐ง Configuration
### Environment Configuration (.env)
The `.env` file controls GeneBot's runtime behavior and security settings:
#### Environment Modes
```bash
# ENVIRONMENT controls the trading mode
ENVIRONMENT=development # Options: development, staging, production
# Development Mode:
# - Enhanced logging and debugging
# - Additional safety checks
# - Recommended for testing and learning
# Staging Mode:
# - Production-like environment
# - Used for final testing before live trading
# Production Mode:
# - Optimized for live trading
# - Minimal logging overhead
# - Maximum performance
```
#### Paper Trading vs Live Trading
```bash
# PAPER_TRADING controls whether to use real money
PAPER_TRADING=true # true = demo/sandbox, false = live trading
# Always start with PAPER_TRADING=true for safety!
# Only set to false when you're confident in your setup
```
#### Risk Management Settings
```bash
# Global risk limits (applied across all accounts)
MAX_DAILY_LOSS=1000 # Stop trading if daily loss exceeds this
MAX_PORTFOLIO_RISK=0.02 # Maximum risk per trade (2% of portfolio)
PORTFOLIO_VALUE=100000 # Total portfolio value for risk calculations
# Position sizing
MAX_POSITION_SIZE=0.1 # Maximum position size (10% of portfolio)
MAX_OPEN_POSITIONS=5 # Maximum number of concurrent positions
```
#### API Credentials
```bash
# Crypto Exchange APIs
BINANCE_API_KEY=your_binance_api_key
BINANCE_API_SECRET=your_binance_secret
BINANCE_SANDBOX=true # Use testnet for safety
COINBASE_API_KEY=your_coinbase_key
COINBASE_API_SECRET=your_coinbase_secret
COINBASE_SANDBOX=true
# Forex Broker APIs
OANDA_API_KEY=your_oanda_key
OANDA_ACCOUNT_ID=your_account_id
OANDA_SANDBOX=true # Use demo environment
# Interactive Brokers
IB_HOST=127.0.0.1
IB_PORT=7497 # 7497 for paper trading, 7496 for live
IB_CLIENT_ID=1
```
### Account Configuration (config/accounts.yaml)
Define your trading accounts with specific settings:
```yaml
crypto_exchanges:
binance-main:
name: 'Binance Main Account'
exchange_type: 'binance'
api_key: '${BINANCE_API_KEY}'
api_secret: '${BINANCE_API_SECRET}'
sandbox: true # Use sandbox/testnet
enabled: true # Enable/disable this account
max_position_size: 1000 # Max position size in USD
risk_limit: 0.02 # Risk per trade (2%)
trading_pairs: ['BTC/USDT', 'ETH/USDT', 'ADA/USDT']
coinbase-demo:
name: 'Coinbase Demo'
exchange_type: 'coinbase'
api_key: '${COINBASE_API_KEY}'
api_secret: '${COINBASE_API_SECRET}'
sandbox: true
enabled: false # Disabled for now
max_position_size: 500
risk_limit: 0.01
forex_brokers:
oanda-demo:
name: 'OANDA Demo Account'
broker_type: 'oanda'
api_key: '${OANDA_API_KEY}'
account_id: '${OANDA_ACCOUNT_ID}'
sandbox: true
enabled: true
max_position_size: 10000 # Max position size in account currency
leverage: 50 # Maximum leverage
currency_pairs: ['EUR/USD', 'GBP/USD', 'USD/JPY']
ib-paper:
name: 'Interactive Brokers Paper'
broker_type: 'ib'
host: '${IB_HOST}'
port: 7497 # Paper trading port
client_id: 1
enabled: true
max_position_size: 5000
leverage: 30
```
### Trading Strategy Configuration (config/trading_bot_config.yaml)
Configure your trading strategies and global settings:
```yaml
# Global Trading Settings
trading:
max_position_size: 0.1 # 10% of portfolio per position
risk_per_trade: 0.02 # 2% risk per trade
max_drawdown: 0.15 # Stop if drawdown exceeds 15%
max_daily_trades: 10 # Limit daily trades
trading_hours:
start: "09:00" # Start trading time (UTC)
end: "17:00" # End trading time (UTC)
timezone: "UTC"
# Risk Management
risk_management:
stop_loss_percentage: 0.02 # 2% stop loss
take_profit_percentage: 0.04 # 4% take profit
trailing_stop: true # Enable trailing stops
max_correlation: 0.7 # Max correlation between positions
# Strategy Configuration
strategies:
- name: "RSI_Mean_Reversion"
enabled: true
markets: ["crypto", "forex"] # Apply to both markets
parameters:
rsi_period: 14
oversold_threshold: 30
overbought_threshold: 70
position_size: 0.05 # 5% of portfolio
- name: "Moving_Average_Crossover"
enabled: true
markets: ["crypto"] # Crypto only
parameters:
fast_ma: 10
slow_ma: 20
position_size: 0.03
- name: "Forex_Session_Strategy"
enabled: false # Disabled
markets: ["forex"]
parameters:
session: "london"
volatility_threshold: 0.5
# Multi-Market Settings
multi_market:
cross_market_arbitrage: true # Enable arbitrage opportunities
correlation_threshold: 0.8 # Correlation limit for risk management
max_exposure_per_market: 0.6 # Max 60% exposure per market type
rebalancing_frequency: "daily" # Portfolio rebalancing
```
## ๐ Step-by-Step Tutorials
### Tutorial 1: Complete Setup from Scratch
#### Step 1: Install and Initialize
```bash
# Install GeneBot
pip install genebot
# Initialize workspace
genebot init-config
# Check what was created
ls -la
```
#### Step 2: Configure Environment
```bash
# Edit the .env file
nano .env
# Set basic configuration:
ENVIRONMENT=development
PAPER_TRADING=true
MAX_DAILY_LOSS=500
PORTFOLIO_VALUE=10000
```
#### Step 3: Set Up Demo Accounts
```bash
# Set up demo accounts automatically
genebot setup-demo
# Verify accounts were created
genebot list
# Validate configuration
genebot validate
```
#### Step 4: Start Trading
```bash
# Start the bot
genebot start
# Check status in another terminal
genebot status
# View logs
tail -f logs/trading_bot.log
```
### Tutorial 2: Adding Real Exchange Accounts
#### Step 1: Get API Credentials
1. **Binance**: Go to Binance.com โ Account โ API Management
2. **OANDA**: Go to OANDA โ My Account โ Manage API Access
3. **Create API keys with appropriate permissions**
#### Step 2: Add Credentials to Environment
```bash
# Edit .env file
nano .env
# Add your real API credentials
BINANCE_API_KEY=your_real_binance_key
BINANCE_API_SECRET=your_real_binance_secret
BINANCE_SANDBOX=true # Keep as true for testing
OANDA_API_KEY=your_real_oanda_key
OANDA_ACCOUNT_ID=your_real_account_id
OANDA_SANDBOX=true # Keep as true for testing
```
#### Step 3: Add Accounts Using CLI
```bash
# Add Binance account (interactive)
genebot add-crypto binance --mode demo
# Follow the prompts:
# - Account name: binance-main
# - Enable account: yes
# - Max position size: 1000
# - Risk limit: 0.02
# Add OANDA account (interactive)
genebot add-forex oanda --mode demo
# Follow the prompts:
# - Account name: oanda-main
# - Enable account: yes
# - Max position size: 5000
# - Leverage: 30
```
#### Step 4: Validate and Test
```bash
# Validate all accounts
genebot validate-accounts
# List configured accounts
genebot list
# Test with paper trading first
genebot start
```
### Tutorial 3: Custom Strategy Configuration
#### Step 1: Edit Strategy Configuration
```bash
# Edit the trading configuration
nano config/trading_bot_config.yaml
```
#### Step 2: Add Custom Strategy
```yaml
strategies:
- name: "My_Custom_RSI"
enabled: true
markets: ["crypto"]
parameters:
rsi_period: 21 # Custom RSI period
oversold_threshold: 25 # More aggressive oversold
overbought_threshold: 75 # More aggressive overbought
position_size: 0.03 # 3% position size
stop_loss: 0.02 # 2% stop loss
take_profit: 0.06 # 6% take profit
```
#### Step 3: Test Strategy
```bash
# Validate configuration
genebot validate
# Start with paper trading
PAPER_TRADING=true genebot start
# Monitor performance
genebot status
genebot report
```
### Tutorial 4: Multi-Market Arbitrage Setup
#### Step 1: Enable Multi-Market Features
```bash
# Edit trading configuration
nano config/trading_bot_config.yaml
```
#### Step 2: Configure Arbitrage Settings
```yaml
multi_market:
cross_market_arbitrage: true
correlation_threshold: 0.8
max_exposure_per_market: 0.5
arbitrage_min_profit: 0.005 # Minimum 0.5% profit
strategies:
- name: "Cross_Market_Arbitrage"
enabled: true
markets: ["crypto", "forex"]
parameters:
min_spread: 0.005
max_position_size: 0.1
execution_timeout: 30
```
#### Step 3: Add Multiple Exchange Accounts
```bash
# Add multiple crypto exchanges
genebot add-crypto binance --mode demo
genebot add-crypto coinbase --mode demo
# Add forex brokers
genebot add-forex oanda --mode demo
genebot add-forex ib --mode demo
# Validate all accounts
genebot validate
```
### Tutorial 5: Production Deployment
#### Step 1: Switch to Production Mode
```bash
# Edit environment for production
nano .env
# Update settings:
ENVIRONMENT=production
PAPER_TRADING=false # CAREFUL: This uses real money!
MAX_DAILY_LOSS=2000 # Increase limits for production
PORTFOLIO_VALUE=50000
```
#### Step 2: Enable Real Trading Accounts
```bash
# Edit account configuration
nano config/accounts.yaml
# Change sandbox settings:
crypto_exchanges:
binance-main:
sandbox: false # Use real trading
enabled: true
```
#### Step 3: Final Validation and Deployment
```bash
# Comprehensive validation
genebot validate
genebot health-check
# Backup configuration
genebot backup-config
# Start production trading
genebot start
# Monitor closely
watch -n 5 'genebot status'
```
### Advanced Configuration Tips
#### 1. Environment-Specific Settings
```bash
# Use different settings for different environments
# Development
ENVIRONMENT=development
PAPER_TRADING=true
MAX_DAILY_LOSS=100
# Production
ENVIRONMENT=production
PAPER_TRADING=false
MAX_DAILY_LOSS=5000
```
#### 2. Security Best Practices
```bash
# Never commit real API keys to version control
# Use environment variables for sensitive data
# Enable IP whitelisting on exchanges
# Use read-only API keys when possible
# Regularly rotate API keys
```
#### 3. Testing Configuration
```bash
# Always test with demo accounts first
genebot setup-demo
genebot validate
genebot start
# Monitor logs for any issues
tail -f logs/trading_bot.log
```
#### 4. Monitoring and Maintenance
```bash
# Regular health checks
genebot health-check
# Generate reports
genebot report
# Backup configurations
genebot backup-config
# Update strategies based on performance
nano config/trading_bot_config.yaml
```
## ๐ Supported Markets & Exchanges
### Cryptocurrency Exchanges
| Exchange | Spot Trading | Futures | Sandbox | Status |
|----------|-------------|---------|---------|--------|
| Binance | โ
| โ
| โ
| Active |
| Coinbase | โ
| โ | โ
| Active |
| Kraken | โ
| โ
| โ
| Active |
| KuCoin | โ
| โ
| โ
| Active |
| Bybit | โ
| โ
| โ
| Active |
### Forex Brokers
| Broker | Spot Forex | CFDs | Demo | Status |
|--------|------------|------|------|--------|
| OANDA | โ
| โ
| โ
| Active |
| MetaTrader 5 | โ
| โ
| โ
| Active |
| Interactive Brokers | โ
| โ
| โ
| Active |
## ๐งช Testing & Development
### Run Tests
```bash
# Run all tests
pytest
# Run specific test categories
pytest tests/test_strategies.py
pytest tests/test_risk_management.py
pytest tests/test_multi_market.py
# Run with coverage
pytest --cov=genebot
```
### Development Setup
```bash
# Install development dependencies
pip install -e ".[dev]"
# Run code formatting
black genebot/
flake8 genebot/
# Type checking
mypy genebot/
```
## ๐ Performance & Monitoring
### Grafana Dashboards
- **Trading Overview**: Real-time P&L, positions, and performance
- **Risk Monitoring**: Drawdown, exposure, and risk metrics
- **Multi-Market Analysis**: Cross-market correlations and arbitrage
- **System Health**: Bot status, API health, and system metrics
### Prometheus Metrics
- Trading performance metrics
- Risk management indicators
- System health and uptime
- API response times and errors
## ๐ Security & Compliance
### Security Features
- **Encrypted Credential Storage**: API keys stored securely
- **Live API Validation**: Real-time credential verification
- **Audit Trails**: Complete trading history logging
- **Access Controls**: Role-based permission system
### Compliance Support
- **Regulatory Reporting**: Automated compliance reports
- **Trade Surveillance**: Real-time monitoring for suspicious activity
- **Risk Limits**: Configurable risk and exposure limits
- **Documentation**: Comprehensive audit documentation
## ๐ค Contributing
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
### Development Workflow
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Add tests for new functionality
5. Run the test suite
6. Submit a pull request
## ๐ License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## ๐ง Troubleshooting
### Common Issues and Solutions
#### Issue: "No accounts configured yet"
```bash
# Solution: Initialize and set up accounts
genebot init-config
genebot setup-demo
genebot list
```
#### Issue: "API credentials invalid"
```bash
# Solution: Check your .env file and API keys
nano .env
genebot validate-accounts
```
#### Issue: "Permission denied" errors
```bash
# Solution: Check API key permissions on exchange
# Ensure keys have trading permissions enabled
# Verify IP whitelisting settings
```
#### Issue: Bot won't start
```bash
# Solution: Check configuration and logs
genebot validate
genebot health-check
tail -f logs/trading_bot.log
```
#### Issue: "Module not found" errors
```bash
# Solution: Reinstall GeneBot
pip uninstall genebot
pip install genebot
genebot --version
```
### Getting Help
#### Check Configuration
```bash
# Get configuration help
genebot config-help
# Validate everything
genebot validate
genebot health-check
```
#### View Logs
```bash
# View real-time logs
tail -f logs/trading_bot.log
# View error logs
tail -f logs/errors.log
# View all logs
ls -la logs/
```
#### Reset and Start Over
```bash
# If all else fails, reset everything
genebot reset
genebot init-config
genebot setup-demo
```
## ๐ Support
### Documentation
- [User Guide](docs/USER_GUIDE.md)
- [API Reference](docs/API_REFERENCE.md)
- [Strategy Development Guide](docs/STRATEGY_DEVELOPMENT_GUIDE.md)
- [Deployment Guide](docs/DEPLOYMENT_GUIDE.md)
### Community
- **GitHub Issues**: [Report bugs and request features](https://github.com/genebot/genebot/issues)
- **Discussions**: [Community discussions and Q&A](https://github.com/genebot/genebot/discussions)
- **Discord**: [Join our Discord server](https://discord.gg/genebot)
### Professional Support
- **Email**: support@genebot.ai
- **Enterprise Support**: enterprise@genebot.ai
## โ ๏ธ Disclaimer
**IMPORTANT**: Trading involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. GeneBot is provided for educational and research purposes. Always test strategies thoroughly in demo environments before live trading.
**USE AT YOUR OWN RISK**: The developers of GeneBot are not responsible for any financial losses incurred through the use of this software.
## ๐ฏ Roadmap
### Version 1.1 (Q2 2024)
- [ ] Advanced ML strategies
- [ ] Social trading features
- [ ] Mobile app companion
- [ ] Enhanced backtesting
### Version 1.2 (Q3 2024)
- [ ] Options trading support
- [ ] Advanced portfolio optimization
- [ ] Institutional features
- [ ] API marketplace
---
**Made with โค๏ธ by the GeneBot Team**
*Empowering traders with advanced automation and intelligence.*
Raw data
{
"_id": null,
"home_page": null,
"name": "genebot",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "GeneBot Core Team <maintainers@genebot.ai>",
"keywords": "trading, bot, crypto, forex, algorithmic-trading, multi-market, risk-management, backtesting, portfolio, arbitrage, strategy, automation, finance, investment",
"author": null,
"author_email": "GeneBot Development Team <support@genebot.ai>",
"download_url": "https://files.pythonhosted.org/packages/cd/38/363a89f9bbc8429ee24e2b28d0df18dd85f63fd5d8798123050fcce493ae/genebot-1.1.15.tar.gz",
"platform": null,
"description": "# \ud83e\udd16 GeneBot - Advanced Multi-Market Trading Bot\n\n[](https://python.org)\n[](LICENSE)\n[](https://github.com/genebot/genebot)\n[](https://github.com/genebot/genebot/releases)\n\n```\n \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557\n \u2551 \u2551\n \u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2551\n \u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2551\n \u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2551\n \u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d \u2588\u2588\u2551\u255a\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2551\n \u2551 \u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d \u2588\u2588\u2551 \u2551\n \u2551 \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d \u2551\n \u2551 \u2551\n \u2551 Advanced Multi-Market Trading Bot \u2551\n \u2551 Version 1.1.9 \u2551\n \u2551 \u2551\n \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255d\n```\n\n**GeneBot** is a sophisticated, multi-market trading bot that supports both cryptocurrency exchanges and forex brokers. Built with advanced risk management, comprehensive strategy orchestration, and real-time monitoring capabilities.\n\n## \ud83c\udd95 What's New in v1.1.9\n\n### \ud83d\udd27 Critical Bug Fixes & Improvements\n- **\u2705 Fixed Import Issues**: Resolved module import errors that prevented the bot from starting\n- **\ud83c\udfd7\ufe0f Enhanced Package Structure**: Added missing `markets`, `analysis`, and `data` modules to the package\n- **\ud83d\udd17 Improved Cross-Market Support**: Better integration between crypto and forex trading modules\n- **\ud83d\udee0\ufe0f Streamlined Installation**: Simplified PyPI installation with all dependencies properly configured\n- **\ud83d\udce6 Better Module Organization**: Reorganized package structure for improved maintainability\n\n### \ud83d\ude80 Enhanced Stability\n- **\ud83d\udd04 Robust Error Handling**: Improved exception handling across all trading modules\n- **\ud83d\udd0d Better Validation**: Enhanced account and configuration validation\n- **\ud83d\udcca Improved Logging**: More detailed logging for troubleshooting and monitoring\n- **\u26a1 Performance Optimizations**: Faster startup times and reduced memory usage\n\n## \ud83d\ude80 Key Features\n\n### \ud83c\udf10 Multi-Market Trading\n- **Crypto Exchanges**: Binance, Coinbase, Kraken, KuCoin, Bybit\n- **Forex Brokers**: OANDA, MetaTrader 5, Interactive Brokers\n- **Cross-Market Arbitrage**: Exploit price differences across markets\n- **Unified Portfolio Management**: Manage positions across all markets\n\n### \ud83e\udde0 Advanced Strategy Engine\n- **50+ Built-in Strategies**: Technical indicators, ML patterns, arbitrage\n- **Custom Strategy Development**: Easy-to-use strategy framework\n- **Multi-Strategy Orchestration**: Run multiple strategies simultaneously\n- **Strategy Performance Analytics**: Comprehensive backtesting and analysis\n\n### \ud83d\udee1\ufe0f Comprehensive Risk Management\n- **Real-Time Risk Monitoring**: Position sizing, drawdown protection\n- **Cross-Market Risk Assessment**: Correlation analysis and exposure limits\n- **Anti-Greed System**: Prevents emotional trading decisions\n- **Dynamic Stop-Loss Management**: Adaptive risk controls\n\n### \ud83d\udd10 Enterprise-Grade Security\n- **Live API Validation**: Comprehensive credential testing before trading\n- **Secure Configuration Management**: Encrypted credential storage\n- **Audit Trails**: Complete trading history and compliance reporting\n- **Regulatory Compliance**: Built-in compliance frameworks\n\n### \ud83d\udcca Advanced Analytics & Monitoring\n- **Real-Time Dashboards**: Grafana integration with custom metrics\n- **Performance Analytics**: Detailed P&L analysis and reporting\n- **Alert System**: Email, SMS, and webhook notifications\n- **Backtesting Engine**: Historical strategy validation\n\n## \ud83d\udee0\ufe0f Installation\n\n### Quick Install from PyPI (Recommended)\n```bash\n# Install GeneBot from PyPI\npip install genebot\n\n# Verify installation\ngenebot --version\ngenebot --help\n```\n\n### Development Installation\n```bash\n# Clone the repository\ngit clone https://github.com/genebot/genebot.git\ncd genebot\n\n# Create virtual environment\npython3 -m venv genebot-env\nsource genebot-env/bin/activate\n\n# Install in development mode\npip install -e .\n\n# Install optional features\npip install -e \".[all]\" # All features\npip install -e \".[dev]\" # Development tools\npip install -e \".[monitoring]\" # Monitoring tools\npip install -e \".[ml]\" # Machine Learning tools\n```\n\n## \ud83d\ude80 Quick Start\n\n### 1. Initialize Your Workspace\n```bash\n# Initialize GeneBot configuration files and directories\ngenebot init-config\n```\n\nThis command creates the following structure:\n```\n\u251c\u2500\u2500 .env # API credentials and environment settings\n\u251c\u2500\u2500 config/\n\u2502 \u251c\u2500\u2500 accounts.yaml # Trading account configurations\n\u2502 \u2514\u2500\u2500 trading_bot_config.yaml # Trading strategies and settings\n\u251c\u2500\u2500 logs/ # Trading logs and system logs\n\u251c\u2500\u2500 reports/ # Performance and trading reports\n\u2514\u2500\u2500 backups/ # Configuration backups\n```\n\n### 2. Configure Environment Settings\nEdit the `.env` file created by `init-config`:\n\n```bash\n# Open the environment file\nnano .env\n```\n\n**Environment Configuration Options:**\n```bash\n# Trading Mode\nENVIRONMENT=development # development, staging, production\nPAPER_TRADING=true # true for demo trading, false for live\n\n# Risk Management\nMAX_DAILY_LOSS=1000 # Maximum daily loss in USD\nMAX_PORTFOLIO_RISK=0.02 # Maximum risk per trade (2%)\nPORTFOLIO_VALUE=100000 # Total portfolio value\n\n# Crypto Exchange API (Example: Binance)\nBINANCE_API_KEY=your_api_key_here\nBINANCE_API_SECRET=your_secret_here\nBINANCE_SANDBOX=true # Use sandbox/testnet\n\n# Forex Broker API (Example: OANDA)\nOANDA_API_KEY=your_api_key_here\nOANDA_ACCOUNT_ID=your_account_id_here\nOANDA_SANDBOX=true # Use demo environment\n\n# Notification Settings (Optional)\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\nTELEGRAM_CHAT_ID=your_chat_id\nEMAIL_NOTIFICATIONS=false\n```\n\n### 3. Set Up Demo Accounts (Safe Testing)\n```bash\n# Set up demo accounts for testing\ngenebot setup-demo\n\n# List available exchanges and brokers\ngenebot list-exchanges\ngenebot list-brokers\n\n# Validate demo accounts\ngenebot validate\n```\n\n### 4. Add Your Trading Accounts\n\n#### Option A: Interactive Account Setup\n```bash\n# Add crypto exchange account (interactive prompts)\ngenebot add-crypto binance --mode demo\n\n# Add forex broker account (interactive prompts) \ngenebot add-forex oanda --mode demo\n\n# List all configured accounts\ngenebot list\n```\n\n#### Option B: Manual Configuration\nEdit `config/accounts.yaml`:\n\n```yaml\ncrypto_exchanges:\n binance-demo:\n name: 'Binance Demo Account'\n exchange_type: 'binance'\n api_key: '${BINANCE_API_KEY}'\n api_secret: '${BINANCE_API_SECRET}'\n sandbox: true\n enabled: true\n max_position_size: 1000\n risk_limit: 0.02\n\nforex_brokers:\n oanda-demo:\n name: 'OANDA Demo Account'\n broker_type: 'oanda'\n api_key: '${OANDA_API_KEY}'\n account_id: '${OANDA_ACCOUNT_ID}'\n sandbox: true\n enabled: true\n max_position_size: 10000\n leverage: 50\n```\n\n### 5. Validate Configuration\n```bash\n# Validate all accounts and configuration\ngenebot validate\n\n# Validate specific account\ngenebot validate-accounts\n```\n\n### 6. Start Trading\n```bash\n# Start the trading bot with live API validation\ngenebot start\n\n# Check bot status\ngenebot status\n\n# Generate trading reports\ngenebot report\n```\n\n## \ud83d\udccb Command Reference\n\n### Setup & Configuration\n```bash\ngenebot init-config # Initialize workspace and configuration files\ngenebot config-help # Show detailed configuration guide\ngenebot validate # Validate all accounts and configuration\ngenebot backup-config # Backup current configurations\n```\n\n### Account Management\n```bash\n# List available options\ngenebot list-exchanges # List supported crypto exchanges\ngenebot list-brokers # List supported forex brokers\ngenebot list # List all configured accounts\n\n# Add accounts\ngenebot add-crypto <exchange> # Add crypto exchange account\ngenebot add-forex <broker> # Add forex broker account\n\n# Examples:\ngenebot add-crypto binance --mode demo\ngenebot add-forex oanda --mode demo\n\n# Edit accounts\ngenebot edit-crypto <name> # Edit crypto account\ngenebot edit-forex <name> # Edit forex account\n\n# Remove accounts\ngenebot remove-account <name> # Remove specific account\ngenebot remove-all-accounts # Remove all accounts\ngenebot remove-by-exchange <ex> # Remove by exchange type\ngenebot remove-by-type <type> # Remove by account type (crypto/forex)\n\n# Account status\ngenebot enable-account <name> # Enable specific account\ngenebot disable-account <name> # Disable specific account\ngenebot validate-accounts # Validate all account credentials\n```\n\n### Bot Control\n```bash\ngenebot start # Start trading bot\ngenebot stop # Stop trading bot\ngenebot restart # Restart trading bot\ngenebot status # Show detailed bot status\ngenebot health-check # Comprehensive system health check\n```\n\n### Demo & Testing\n```bash\ngenebot setup-demo # Setup demo accounts for safe testing\ngenebot cleanup-demo # Remove all demo accounts\n```\n\n### Reporting & Analytics\n```bash\ngenebot report # Generate comprehensive trading report\n```\n\n### Utilities\n```bash\ngenebot reset # Clean up all data and reset system\ngenebot --version # Show version information\ngenebot --help # Show help and available commands\n```\n\n## \ud83d\udd27 Configuration\n\n### Environment Configuration (.env)\n\nThe `.env` file controls GeneBot's runtime behavior and security settings:\n\n#### Environment Modes\n```bash\n# ENVIRONMENT controls the trading mode\nENVIRONMENT=development # Options: development, staging, production\n\n# Development Mode:\n# - Enhanced logging and debugging\n# - Additional safety checks\n# - Recommended for testing and learning\n\n# Staging Mode:\n# - Production-like environment\n# - Used for final testing before live trading\n\n# Production Mode:\n# - Optimized for live trading\n# - Minimal logging overhead\n# - Maximum performance\n```\n\n#### Paper Trading vs Live Trading\n```bash\n# PAPER_TRADING controls whether to use real money\nPAPER_TRADING=true # true = demo/sandbox, false = live trading\n\n# Always start with PAPER_TRADING=true for safety!\n# Only set to false when you're confident in your setup\n```\n\n#### Risk Management Settings\n```bash\n# Global risk limits (applied across all accounts)\nMAX_DAILY_LOSS=1000 # Stop trading if daily loss exceeds this\nMAX_PORTFOLIO_RISK=0.02 # Maximum risk per trade (2% of portfolio)\nPORTFOLIO_VALUE=100000 # Total portfolio value for risk calculations\n\n# Position sizing\nMAX_POSITION_SIZE=0.1 # Maximum position size (10% of portfolio)\nMAX_OPEN_POSITIONS=5 # Maximum number of concurrent positions\n```\n\n#### API Credentials\n```bash\n# Crypto Exchange APIs\nBINANCE_API_KEY=your_binance_api_key\nBINANCE_API_SECRET=your_binance_secret\nBINANCE_SANDBOX=true # Use testnet for safety\n\nCOINBASE_API_KEY=your_coinbase_key\nCOINBASE_API_SECRET=your_coinbase_secret\nCOINBASE_SANDBOX=true\n\n# Forex Broker APIs\nOANDA_API_KEY=your_oanda_key\nOANDA_ACCOUNT_ID=your_account_id\nOANDA_SANDBOX=true # Use demo environment\n\n# Interactive Brokers\nIB_HOST=127.0.0.1\nIB_PORT=7497 # 7497 for paper trading, 7496 for live\nIB_CLIENT_ID=1\n```\n\n### Account Configuration (config/accounts.yaml)\n\nDefine your trading accounts with specific settings:\n\n```yaml\ncrypto_exchanges:\n binance-main:\n name: 'Binance Main Account'\n exchange_type: 'binance'\n api_key: '${BINANCE_API_KEY}'\n api_secret: '${BINANCE_API_SECRET}'\n sandbox: true # Use sandbox/testnet\n enabled: true # Enable/disable this account\n max_position_size: 1000 # Max position size in USD\n risk_limit: 0.02 # Risk per trade (2%)\n trading_pairs: ['BTC/USDT', 'ETH/USDT', 'ADA/USDT']\n \n coinbase-demo:\n name: 'Coinbase Demo'\n exchange_type: 'coinbase'\n api_key: '${COINBASE_API_KEY}'\n api_secret: '${COINBASE_API_SECRET}'\n sandbox: true\n enabled: false # Disabled for now\n max_position_size: 500\n risk_limit: 0.01\n\nforex_brokers:\n oanda-demo:\n name: 'OANDA Demo Account'\n broker_type: 'oanda'\n api_key: '${OANDA_API_KEY}'\n account_id: '${OANDA_ACCOUNT_ID}'\n sandbox: true\n enabled: true\n max_position_size: 10000 # Max position size in account currency\n leverage: 50 # Maximum leverage\n currency_pairs: ['EUR/USD', 'GBP/USD', 'USD/JPY']\n \n ib-paper:\n name: 'Interactive Brokers Paper'\n broker_type: 'ib'\n host: '${IB_HOST}'\n port: 7497 # Paper trading port\n client_id: 1\n enabled: true\n max_position_size: 5000\n leverage: 30\n```\n\n### Trading Strategy Configuration (config/trading_bot_config.yaml)\n\nConfigure your trading strategies and global settings:\n\n```yaml\n# Global Trading Settings\ntrading:\n max_position_size: 0.1 # 10% of portfolio per position\n risk_per_trade: 0.02 # 2% risk per trade\n max_drawdown: 0.15 # Stop if drawdown exceeds 15%\n max_daily_trades: 10 # Limit daily trades\n trading_hours:\n start: \"09:00\" # Start trading time (UTC)\n end: \"17:00\" # End trading time (UTC)\n timezone: \"UTC\"\n\n# Risk Management\nrisk_management:\n stop_loss_percentage: 0.02 # 2% stop loss\n take_profit_percentage: 0.04 # 4% take profit\n trailing_stop: true # Enable trailing stops\n max_correlation: 0.7 # Max correlation between positions\n\n# Strategy Configuration\nstrategies:\n - name: \"RSI_Mean_Reversion\"\n enabled: true\n markets: [\"crypto\", \"forex\"] # Apply to both markets\n parameters:\n rsi_period: 14\n oversold_threshold: 30\n overbought_threshold: 70\n position_size: 0.05 # 5% of portfolio\n \n - name: \"Moving_Average_Crossover\"\n enabled: true\n markets: [\"crypto\"] # Crypto only\n parameters:\n fast_ma: 10\n slow_ma: 20\n position_size: 0.03\n \n - name: \"Forex_Session_Strategy\"\n enabled: false # Disabled\n markets: [\"forex\"]\n parameters:\n session: \"london\"\n volatility_threshold: 0.5\n\n# Multi-Market Settings\nmulti_market:\n cross_market_arbitrage: true # Enable arbitrage opportunities\n correlation_threshold: 0.8 # Correlation limit for risk management\n max_exposure_per_market: 0.6 # Max 60% exposure per market type\n rebalancing_frequency: \"daily\" # Portfolio rebalancing\n```\n\n## \ud83d\udcda Step-by-Step Tutorials\n\n### Tutorial 1: Complete Setup from Scratch\n\n#### Step 1: Install and Initialize\n```bash\n# Install GeneBot\npip install genebot\n\n# Initialize workspace\ngenebot init-config\n\n# Check what was created\nls -la\n```\n\n#### Step 2: Configure Environment\n```bash\n# Edit the .env file\nnano .env\n\n# Set basic configuration:\nENVIRONMENT=development\nPAPER_TRADING=true\nMAX_DAILY_LOSS=500\nPORTFOLIO_VALUE=10000\n```\n\n#### Step 3: Set Up Demo Accounts\n```bash\n# Set up demo accounts automatically\ngenebot setup-demo\n\n# Verify accounts were created\ngenebot list\n\n# Validate configuration\ngenebot validate\n```\n\n#### Step 4: Start Trading\n```bash\n# Start the bot\ngenebot start\n\n# Check status in another terminal\ngenebot status\n\n# View logs\ntail -f logs/trading_bot.log\n```\n\n### Tutorial 2: Adding Real Exchange Accounts\n\n#### Step 1: Get API Credentials\n1. **Binance**: Go to Binance.com \u2192 Account \u2192 API Management\n2. **OANDA**: Go to OANDA \u2192 My Account \u2192 Manage API Access\n3. **Create API keys with appropriate permissions**\n\n#### Step 2: Add Credentials to Environment\n```bash\n# Edit .env file\nnano .env\n\n# Add your real API credentials\nBINANCE_API_KEY=your_real_binance_key\nBINANCE_API_SECRET=your_real_binance_secret\nBINANCE_SANDBOX=true # Keep as true for testing\n\nOANDA_API_KEY=your_real_oanda_key\nOANDA_ACCOUNT_ID=your_real_account_id\nOANDA_SANDBOX=true # Keep as true for testing\n```\n\n#### Step 3: Add Accounts Using CLI\n```bash\n# Add Binance account (interactive)\ngenebot add-crypto binance --mode demo\n\n# Follow the prompts:\n# - Account name: binance-main\n# - Enable account: yes\n# - Max position size: 1000\n# - Risk limit: 0.02\n\n# Add OANDA account (interactive)\ngenebot add-forex oanda --mode demo\n\n# Follow the prompts:\n# - Account name: oanda-main\n# - Enable account: yes\n# - Max position size: 5000\n# - Leverage: 30\n```\n\n#### Step 4: Validate and Test\n```bash\n# Validate all accounts\ngenebot validate-accounts\n\n# List configured accounts\ngenebot list\n\n# Test with paper trading first\ngenebot start\n```\n\n### Tutorial 3: Custom Strategy Configuration\n\n#### Step 1: Edit Strategy Configuration\n```bash\n# Edit the trading configuration\nnano config/trading_bot_config.yaml\n```\n\n#### Step 2: Add Custom Strategy\n```yaml\nstrategies:\n - name: \"My_Custom_RSI\"\n enabled: true\n markets: [\"crypto\"]\n parameters:\n rsi_period: 21 # Custom RSI period\n oversold_threshold: 25 # More aggressive oversold\n overbought_threshold: 75 # More aggressive overbought\n position_size: 0.03 # 3% position size\n stop_loss: 0.02 # 2% stop loss\n take_profit: 0.06 # 6% take profit\n```\n\n#### Step 3: Test Strategy\n```bash\n# Validate configuration\ngenebot validate\n\n# Start with paper trading\nPAPER_TRADING=true genebot start\n\n# Monitor performance\ngenebot status\ngenebot report\n```\n\n### Tutorial 4: Multi-Market Arbitrage Setup\n\n#### Step 1: Enable Multi-Market Features\n```bash\n# Edit trading configuration\nnano config/trading_bot_config.yaml\n```\n\n#### Step 2: Configure Arbitrage Settings\n```yaml\nmulti_market:\n cross_market_arbitrage: true\n correlation_threshold: 0.8\n max_exposure_per_market: 0.5\n arbitrage_min_profit: 0.005 # Minimum 0.5% profit\n \nstrategies:\n - name: \"Cross_Market_Arbitrage\"\n enabled: true\n markets: [\"crypto\", \"forex\"]\n parameters:\n min_spread: 0.005\n max_position_size: 0.1\n execution_timeout: 30\n```\n\n#### Step 3: Add Multiple Exchange Accounts\n```bash\n# Add multiple crypto exchanges\ngenebot add-crypto binance --mode demo\ngenebot add-crypto coinbase --mode demo\n\n# Add forex brokers\ngenebot add-forex oanda --mode demo\ngenebot add-forex ib --mode demo\n\n# Validate all accounts\ngenebot validate\n```\n\n### Tutorial 5: Production Deployment\n\n#### Step 1: Switch to Production Mode\n```bash\n# Edit environment for production\nnano .env\n\n# Update settings:\nENVIRONMENT=production\nPAPER_TRADING=false # CAREFUL: This uses real money!\nMAX_DAILY_LOSS=2000 # Increase limits for production\nPORTFOLIO_VALUE=50000\n```\n\n#### Step 2: Enable Real Trading Accounts\n```bash\n# Edit account configuration\nnano config/accounts.yaml\n\n# Change sandbox settings:\ncrypto_exchanges:\n binance-main:\n sandbox: false # Use real trading\n enabled: true\n```\n\n#### Step 3: Final Validation and Deployment\n```bash\n# Comprehensive validation\ngenebot validate\ngenebot health-check\n\n# Backup configuration\ngenebot backup-config\n\n# Start production trading\ngenebot start\n\n# Monitor closely\nwatch -n 5 'genebot status'\n```\n\n### Advanced Configuration Tips\n\n#### 1. Environment-Specific Settings\n```bash\n# Use different settings for different environments\n# Development\nENVIRONMENT=development\nPAPER_TRADING=true\nMAX_DAILY_LOSS=100\n\n# Production\nENVIRONMENT=production\nPAPER_TRADING=false\nMAX_DAILY_LOSS=5000\n```\n\n#### 2. Security Best Practices\n```bash\n# Never commit real API keys to version control\n# Use environment variables for sensitive data\n# Enable IP whitelisting on exchanges\n# Use read-only API keys when possible\n# Regularly rotate API keys\n```\n\n#### 3. Testing Configuration\n```bash\n# Always test with demo accounts first\ngenebot setup-demo\ngenebot validate\ngenebot start\n\n# Monitor logs for any issues\ntail -f logs/trading_bot.log\n```\n\n#### 4. Monitoring and Maintenance\n```bash\n# Regular health checks\ngenebot health-check\n\n# Generate reports\ngenebot report\n\n# Backup configurations\ngenebot backup-config\n\n# Update strategies based on performance\nnano config/trading_bot_config.yaml\n```\n\n## \ud83d\udcca Supported Markets & Exchanges\n\n### Cryptocurrency Exchanges\n| Exchange | Spot Trading | Futures | Sandbox | Status |\n|----------|-------------|---------|---------|--------|\n| Binance | \u2705 | \u2705 | \u2705 | Active |\n| Coinbase | \u2705 | \u274c | \u2705 | Active |\n| Kraken | \u2705 | \u2705 | \u2705 | Active |\n| KuCoin | \u2705 | \u2705 | \u2705 | Active |\n| Bybit | \u2705 | \u2705 | \u2705 | Active |\n\n### Forex Brokers\n| Broker | Spot Forex | CFDs | Demo | Status |\n|--------|------------|------|------|--------|\n| OANDA | \u2705 | \u2705 | \u2705 | Active |\n| MetaTrader 5 | \u2705 | \u2705 | \u2705 | Active |\n| Interactive Brokers | \u2705 | \u2705 | \u2705 | Active |\n\n## \ud83e\uddea Testing & Development\n\n### Run Tests\n```bash\n# Run all tests\npytest\n\n# Run specific test categories\npytest tests/test_strategies.py\npytest tests/test_risk_management.py\npytest tests/test_multi_market.py\n\n# Run with coverage\npytest --cov=genebot\n```\n\n### Development Setup\n```bash\n# Install development dependencies\npip install -e \".[dev]\"\n\n# Run code formatting\nblack genebot/\nflake8 genebot/\n\n# Type checking\nmypy genebot/\n```\n\n## \ud83d\udcc8 Performance & Monitoring\n\n### Grafana Dashboards\n- **Trading Overview**: Real-time P&L, positions, and performance\n- **Risk Monitoring**: Drawdown, exposure, and risk metrics\n- **Multi-Market Analysis**: Cross-market correlations and arbitrage\n- **System Health**: Bot status, API health, and system metrics\n\n### Prometheus Metrics\n- Trading performance metrics\n- Risk management indicators\n- System health and uptime\n- API response times and errors\n\n## \ud83d\udd12 Security & Compliance\n\n### Security Features\n- **Encrypted Credential Storage**: API keys stored securely\n- **Live API Validation**: Real-time credential verification\n- **Audit Trails**: Complete trading history logging\n- **Access Controls**: Role-based permission system\n\n### Compliance Support\n- **Regulatory Reporting**: Automated compliance reports\n- **Trade Surveillance**: Real-time monitoring for suspicious activity\n- **Risk Limits**: Configurable risk and exposure limits\n- **Documentation**: Comprehensive audit documentation\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Workflow\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests for new functionality\n5. Run the test suite\n6. Submit a pull request\n\n## \ud83d\udcc4 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83d\udd27 Troubleshooting\n\n### Common Issues and Solutions\n\n#### Issue: \"No accounts configured yet\"\n```bash\n# Solution: Initialize and set up accounts\ngenebot init-config\ngenebot setup-demo\ngenebot list\n```\n\n#### Issue: \"API credentials invalid\"\n```bash\n# Solution: Check your .env file and API keys\nnano .env\ngenebot validate-accounts\n```\n\n#### Issue: \"Permission denied\" errors\n```bash\n# Solution: Check API key permissions on exchange\n# Ensure keys have trading permissions enabled\n# Verify IP whitelisting settings\n```\n\n#### Issue: Bot won't start\n```bash\n# Solution: Check configuration and logs\ngenebot validate\ngenebot health-check\ntail -f logs/trading_bot.log\n```\n\n#### Issue: \"Module not found\" errors\n```bash\n# Solution: Reinstall GeneBot\npip uninstall genebot\npip install genebot\ngenebot --version\n```\n\n### Getting Help\n\n#### Check Configuration\n```bash\n# Get configuration help\ngenebot config-help\n\n# Validate everything\ngenebot validate\ngenebot health-check\n```\n\n#### View Logs\n```bash\n# View real-time logs\ntail -f logs/trading_bot.log\n\n# View error logs\ntail -f logs/errors.log\n\n# View all logs\nls -la logs/\n```\n\n#### Reset and Start Over\n```bash\n# If all else fails, reset everything\ngenebot reset\ngenebot init-config\ngenebot setup-demo\n```\n\n## \ud83c\udd98 Support\n\n### Documentation\n- [User Guide](docs/USER_GUIDE.md)\n- [API Reference](docs/API_REFERENCE.md)\n- [Strategy Development Guide](docs/STRATEGY_DEVELOPMENT_GUIDE.md)\n- [Deployment Guide](docs/DEPLOYMENT_GUIDE.md)\n\n### Community\n- **GitHub Issues**: [Report bugs and request features](https://github.com/genebot/genebot/issues)\n- **Discussions**: [Community discussions and Q&A](https://github.com/genebot/genebot/discussions)\n- **Discord**: [Join our Discord server](https://discord.gg/genebot)\n\n### Professional Support\n- **Email**: support@genebot.ai\n- **Enterprise Support**: enterprise@genebot.ai\n\n## \u26a0\ufe0f Disclaimer\n\n**IMPORTANT**: Trading involves substantial risk of loss and is not suitable for all investors. Past performance is not indicative of future results. GeneBot is provided for educational and research purposes. Always test strategies thoroughly in demo environments before live trading.\n\n**USE AT YOUR OWN RISK**: The developers of GeneBot are not responsible for any financial losses incurred through the use of this software.\n\n## \ud83c\udfaf Roadmap\n\n### Version 1.1 (Q2 2024)\n- [ ] Advanced ML strategies\n- [ ] Social trading features\n- [ ] Mobile app companion\n- [ ] Enhanced backtesting\n\n### Version 1.2 (Q3 2024)\n- [ ] Options trading support\n- [ ] Advanced portfolio optimization\n- [ ] Institutional features\n- [ ] API marketplace\n\n---\n\n**Made with \u2764\ufe0f by the GeneBot Team**\n\n*Empowering traders with advanced automation and intelligence.*\n",
"bugtrack_url": null,
"license": null,
"summary": "Advanced Multi-Market Trading Bot with Crypto & Forex Support",
"version": "1.1.15",
"project_urls": {
"Bug Tracker": "https://github.com/genebot/genebot/issues",
"Changelog": "https://github.com/genebot/genebot/blob/main/CHANGELOG.md",
"Code of Conduct": "https://github.com/genebot/genebot/blob/main/CODE_OF_CONDUCT.md",
"Contributing": "https://github.com/genebot/genebot/blob/main/CONTRIBUTING.md",
"Documentation": "https://docs.genebot.ai",
"Feature Requests": "https://github.com/genebot/genebot/discussions",
"Homepage": "https://github.com/genebot/genebot",
"Release Notes": "https://github.com/genebot/genebot/releases",
"Repository": "https://github.com/genebot/genebot.git",
"Security Policy": "https://github.com/genebot/genebot/security/policy"
},
"split_keywords": [
"trading",
" bot",
" crypto",
" forex",
" algorithmic-trading",
" multi-market",
" risk-management",
" backtesting",
" portfolio",
" arbitrage",
" strategy",
" automation",
" finance",
" investment"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6cfacd2e789ff66e80eb21ba0768351f6476abafcac95338b71b4de071aebc59",
"md5": "a4fd7aee3e2db791262cb33f789e0019",
"sha256": "c895d0696dc21573777bcaef0f55743303d7e6cf757bd1a36c63ec383b21f3ae"
},
"downloads": -1,
"filename": "genebot-1.1.15-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a4fd7aee3e2db791262cb33f789e0019",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 176383,
"upload_time": "2025-09-18T21:48:52",
"upload_time_iso_8601": "2025-09-18T21:48:52.932707Z",
"url": "https://files.pythonhosted.org/packages/6c/fa/cd2e789ff66e80eb21ba0768351f6476abafcac95338b71b4de071aebc59/genebot-1.1.15-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cd38363a89f9bbc8429ee24e2b28d0df18dd85f63fd5d8798123050fcce493ae",
"md5": "16d76763ce1c30116fa216c86994998a",
"sha256": "96d86573af60753ff0b7d1876e0201f626144b0ac96574cb778f5b3dc850570c"
},
"downloads": -1,
"filename": "genebot-1.1.15.tar.gz",
"has_sig": false,
"md5_digest": "16d76763ce1c30116fa216c86994998a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 541585,
"upload_time": "2025-09-18T21:48:55",
"upload_time_iso_8601": "2025-09-18T21:48:55.300911Z",
"url": "https://files.pythonhosted.org/packages/cd/38/363a89f9bbc8429ee24e2b28d0df18dd85f63fd5d8798123050fcce493ae/genebot-1.1.15.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-18 21:48:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "genebot",
"github_project": "genebot",
"github_not_found": true,
"lcname": "genebot"
}