Professional copy trading solution for HyperLiquid DEX with intelligent position management and automated execution.
HyperLiquid Copy Trader is a sophisticated copy trading application designed for the HyperLiquid decentralized exchange. It provides automated position and order replication with intelligent entry strategies, proportional sizing, and comprehensive risk management features.
- If you need help or question with this repo, please contact me via Telegram
- π― Dual Trading Modes: Position-based and order-based copy trading strategies
- π Intelligent Position Sizing: Automatic scaling based on account values and leverage
- β‘ Price-Aware Entry: Smart entry timing for optimal position entries
- π Secure Credential Management: Encrypted storage using system keyring
- π± Professional GUI: Intuitive interface with real-time monitoring
- π‘οΈ Risk Management: Configurable trade limits and position controls
- π Real-time Monitoring: Live position tracking and detailed logging
- Installation
- Quick Start
- Trading Modes
- Configuration
- Building
- Security
- API Reference
- Contributing
- License
- Python 3.8+ - Download Python
- Linux VPS with SSH access for bot deployment
- Node.js and npm for PM2 process management
- HyperLiquid Account with API access
-
Clone the repository
git clone https://github.com/michalstefanow/hyperliquid-trading-copytrading.git cd hyperliquid-trading-copytrading
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python main.py
Pre-built binaries are available for major platforms:
- macOS: Download Latest Release
- Windows: Download Latest Release
- Linux: Use source installation or build from source
-
Launch the Application
python main.py
-
Configure Server Connection
- Enter your VPS server details
- Provide SSH credentials
- Test connection
-
Setup Trading Configuration
- Input the wallet address to copy
- Set your trading wallet address
- Configure your HyperLiquid API private key
- Set position multiplier/leverage
-
Start Trading
- Click "Start Trading" to begin copy trading
- Monitor positions and orders in real-time
- Review logs for detailed execution history
Intelligent position-based copy trading with strategic entry timing
- Smart Entry Strategy: Only enters positions when price is favorable relative to the target's entry price
- Dynamic Position Sizing: Automatically scales positions based on account value ratios
- Delayed Execution: Queues unfavorable entries for better price execution
- Comprehensive Monitoring: Real-time position tracking with detailed reporting
Ideal for: Long-term position mirroring with optimized entry points
Real-time order replication with precision execution
- Instant Order Mirroring: Copies limit orders in real-time with proportional sizing
- Order Lifecycle Management: Handles placement, updates, and cancellations automatically
- Reduce-Only Support: Maintains order types including reduce-only orders
- High-Frequency Updates: 500ms polling for minimal latency
Ideal for: Active trading strategies requiring immediate order execution
Create a .env
file in your deployment directory:
# Trading Configuration
PRIVATE_KEY_API=your_hyperliquid_api_private_key
ACCOUNT_TO_COPY=0x1234567890abcdef1234567890abcdef12345678
TRADING_ADDRESS=0xabcdef1234567890abcdef1234567890abcdef12
LEVERAGE=1.5
# Optional Settings
TRADE_LIMIT=10.0 # Minimum trade size in USD
MINI_ALLOC_OF_PF=0 # Minimum portfolio allocation %
The application uses the system keyring for secure credential storage:
- SSH passwords are encrypted using system keyring
- API private keys are stored securely and never logged
- Configuration files contain only non-sensitive data
Your VPS should have:
- Ubuntu 20.04+ or similar Linux distribution
- Python 3.8+ and pip
- Node.js 16+ and npm
- PM2 for process management
- SSH access enabled
python scripts/build_macos.py
Output: dist/HyperLiquidCopyTrader.app
python scripts/build_windows.py
Output: dist/HyperLiquidCopyTrader/
# Install development dependencies
pip install -e ".[dev]"
# Run code formatting
black src/
# Run type checking
mypy src/
# Run tests
pytest tests/
- π Never share private keys or store them in plain text
- π Use secure SSH connections with key-based authentication when possible
- π Enable 2FA on all exchange accounts
- πΎ Regular backups of configuration and logs
- π Monitor positions regularly for unexpected behavior
Ensure your HyperLiquid API key has only necessary permissions:
- β Trading - Required for order placement
- β Account Reading - Required for position monitoring
- β Withdrawal - Not required, should be disabled
- Use VPS providers with strong security practices
- Keep your server updated with security patches
- Consider using a VPN for additional security
- Monitor server logs for unauthorized access attempts
Handles real-time order copying and management.
from src.bots import OrderBot
bot = OrderBot()
await bot.run()
Manages position-based copy trading with intelligent entry strategies.
from src.bots import PositionBot
bot = PositionBot()
await bot.run()
Main GUI application for bot management and monitoring.
from src.gui import TradingBotApp
import tkinter as tk
root = tk.Tk()
app = TradingBotApp(root)
root.mainloop()
Parameter | Description | Default | Range |
---|---|---|---|
LEVERAGE |
Position size multiplier | 1.0 | 0.1 - 50.0 |
TRADE_LIMIT |
Minimum trade size (USD) | 10.0 | 1.0 - 1000.0 |
MINI_ALLOC_OF_PF |
Minimum portfolio allocation (%) | 0.0 | 0.0 - 100.0 |
We welcome contributions from the community! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes with proper testing
- Follow code style: Run
black src/
for formatting - Commit changes:
git commit -m 'Add amazing feature'
- Push to branch:
git push origin feature/amazing-feature
- Open a Pull Request
- Follow PEP 8 style guidelines
- Add type hints for all functions
- Include docstrings for public methods
- Write unit tests for new features
- Update documentation as needed
When reporting issues, please include:
- Detailed description of the problem
- Steps to reproduce the issue
- Expected vs actual behavior
- System information (OS, Python version)
- Relevant log outputs (sanitized)
This project is licensed under the MIT License - see the LICENSE file for details.
Trading cryptocurrencies involves substantial risk and may not be suitable for all investors. Past performance does not guarantee future results. This software is provided "as is" without warranties of any kind. Users are responsible for their own trading decisions and should understand the risks involved.
- This software is for educational and research purposes
- Always test with small amounts first
- Never risk more than you can afford to lose
- Understand the risks of automated trading
- Be aware of potential bugs or market conditions that could cause losses
- HyperLiquid Team for building an innovative DEX platform
- Python Community for excellent libraries and tools
- Contributors who help improve this project
- Users who provide valuable feedback and bug reports
Built with β€οΈ for the DeFi community
β Star this repo if you find it helpful!