Skip to content

JDENNO91/hyperliquidtradingbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hyperliquid Trading Bot

A comprehensive Python trading bot for Hyperliquid DEX with multiple profitable strategies, backtesting, live simulation, and live trading capabilities.

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/JDENNO91/hyperliquidtradingbot.git
cd hyperliquidtradingbot

# Run the automated setup
./docs/setup-scripts/setup.sh

First Backtest

# Run a quick backtest
python tests/test_core.py

πŸ“Š Project Structure

hyperliquidtradingbot/
β”œβ”€β”€ 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

🎯 Strategies Explained

1. RSI Scalping Strategy

  • Timeframe: 1m, 5m
  • Returns: 97%+ in backtests
  • Risk: High frequency, high reward
  • Best for: Aggressive traders

2. MA+RSI Hybrid Strategy

  • Timeframe: 5m, 15m
  • Returns: 85%+ in backtests
  • Risk: Balanced approach
  • Best for: Conservative traders

3. BBRSI Strategy

  • Timeframe: 5m, 15m
  • Returns: 90%+ in backtests
  • Risk: Medium-high
  • Best for: Technical traders

4. Super Optimized Strategy

  • Timeframe: 5m, 15m
  • Returns: 95%+ in backtests
  • Risk: Optimized for performance
  • Best for: Advanced traders

πŸ’» Usage

Backtesting

# 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

Live Simulation

# Paper trading with real market data
python src/cli/simulate.py --strategy rsi_scalping --config config/production/rsi_scalping/standard_5m.json

Live Trading

# Real trading (requires credentials)
python src/live/run_live.py --strategy rsi_scalping --config config/production/rsi_scalping/standard_5m.json

βš™οΈ Configuration

Production Configs

  • config/production/rsi_scalping/ - RSI scalping configurations
  • config/production/ma_rsi_hybrid/ - MA+RSI hybrid configurations

Strategy Switching

# Switch between strategies
python src/cli/strategy_switcher.py --strategy rsi_scalping

Timeframe Switching

# Switch timeframes
python src/cli/timeframe_switcher.py --timeframe 5m

πŸ” Environment Variables

Create a .env file in the project root:

# Copy the template
cp config/env.template .env

# Edit with your credentials
nano .env

Required variables:

  • HL_API_URL - Hyperliquid API endpoint
  • HL_PRIVATE_KEY - Your private key
  • HL_ADDRESS - Your wallet address

Important Notes:

  • Live Trading: Requires real credentials
  • Live Simulation: Uses testnet (no real money)
  • Backtesting: No credentials needed

Verify Credentials

python tools/check_credentials.py

πŸ“š Documentation

πŸ§ͺ Testing

Quick Health Check

python -c "from src.utils.health_check import health_check; print('βœ… System healthy!' if health_check() else '❌ Issues found')"

Core Test Suite

python tests/test_core.py

Comprehensive Test Suite

python tests/test_project.py

Individual Test Categories

# 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 -v

Test 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)

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: python tests/test_project.py
  5. Submit a pull request

⚠️ Risk Warning

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.

πŸ“ˆ Performance Notes

  • Backtesting: Historical data simulation
  • Live Simulation: Real-time paper trading
  • Live Trading: Real money trading
  • Risk Management: Built-in position sizing and stop-losses

πŸ”— Links


Built with ❀️ for the Hyperliquid community

About

Trading bot for Hyperliquid DEX with 4 profitable strategies and comprehensive backtesting engine.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages