A comprehensive Python trading bot for Hyperliquid DEX with multiple profitable strategies, backtesting, live simulation, and live trading capabilities.
# Clone the repository
git clone https://github.com/JDENNO91/hyperliquidtradingbot.git
cd hyperliquidtradingbot
# Run the automated setup
./docs/setup-scripts/setup.sh# Run a quick backtest
python tests/test_core.pyhyperliquidtradingbot/
βββ src/ # Core trading system
β βββ strategies/ # Trading strategies
β βββ backtesting/ # Backtesting engine
β βββ live/ # Live trading
β βββ live_simulation/ # Paper trading
βββ config/ # Configuration files
βββ tests/ # Test suite
βββ docs/ # Documentation
- Timeframe: 1m, 5m
- Returns: 97%+ in backtests
- Risk: High frequency, high reward
- Best for: Aggressive traders
- Timeframe: 5m, 15m
- Returns: 85%+ in backtests
- Risk: Balanced approach
- Best for: Conservative traders
- Timeframe: 5m, 15m
- Returns: 90%+ in backtests
- Risk: Medium-high
- Best for: Technical traders
- Timeframe: 5m, 15m
- Returns: 95%+ in backtests
- Risk: Optimized for performance
- Best for: Advanced traders
# Run backtest with specific strategy
python src/cli/backtest.py --strategy rsi_scalping --config config/core/backtest_eth.json
# Run optimization
python src/cli/optimize.py --strategy ma_rsi_hybrid# Paper trading with real market data
python src/cli/simulate.py --strategy rsi_scalping --config config/production/rsi_scalping/standard_5m.json# Real trading (requires credentials)
python src/live/run_live.py --strategy rsi_scalping --config config/production/rsi_scalping/standard_5m.jsonconfig/production/rsi_scalping/- RSI scalping configurationsconfig/production/ma_rsi_hybrid/- MA+RSI hybrid configurations
# Switch between strategies
python src/cli/strategy_switcher.py --strategy rsi_scalping# Switch timeframes
python src/cli/timeframe_switcher.py --timeframe 5mCreate a .env file in the project root:
# Copy the template
cp config/env.template .env
# Edit with your credentials
nano .envRequired variables:
HL_API_URL- Hyperliquid API endpointHL_PRIVATE_KEY- Your private keyHL_ADDRESS- Your wallet address
Important Notes:
- Live Trading: Requires real credentials
- Live Simulation: Uses testnet (no real money)
- Backtesting: No credentials needed
python tools/check_credentials.py- Credential Setup Guide
- Trading Strategies Guide
- Strategy Switching Guide
- Trading Commands
- Production Strategies
python -c "from src.utils.health_check import health_check; print('β
System healthy!' if health_check() else 'β Issues found')"python tests/test_core.pypython tests/test_project.py# Integration tests
python -m pytest tests/test_integration.py -v
# Performance tests
python -m pytest tests/test_performance.py -v
# Risk management tests
python -m pytest tests/test_risk_management.py -v
# Strategy tests
python -m pytest tests/test_strategies.py -vTest Coverage:
- β Integration tests (10/10 passing)
- β Performance tests (3/3 passing)
- β Risk management tests (4/4 passing)
- β Strategy tests (5/5 passing)
- β CLI tests (8/8 passing)
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
python tests/test_project.py - Submit a pull request
This software is for educational purposes only. Trading cryptocurrencies involves substantial risk of loss. Never trade with money you cannot afford to lose. Always test strategies thoroughly in simulation before live trading.
- Backtesting: Historical data simulation
- Live Simulation: Real-time paper trading
- Live Trading: Real money trading
- Risk Management: Built-in position sizing and stop-losses
Built with β€οΈ for the Hyperliquid community