# Project Overview This project is a sophisticated, multi-process automated trading bot for the Hyperliquid decentralized exchange. It is written in Python and uses a modular architecture to separate concerns like data fetching, strategy execution, and trade management. The bot uses a high-performance data pipeline with SQLite for storing market data. Trading strategies are defined and configured in a JSON file, allowing for easy adjustments without code changes. The system supports multiple, independent trading agents for risk segregation and PNL tracking. A live terminal dashboard provides real-time monitoring of market data, strategy signals, and the status of all background processes. ## Building and Running ### 1. Setup 1. **Create and activate a virtual environment:** ```bash # For Windows python -m venv .venv .\.venv\Scripts\activate # For macOS/Linux python3 -m venv .venv source .venv/bin/activate ``` 2. **Install dependencies:** ```bash pip install -r requirements.txt ``` 3. **Configure environment variables:** Create a `.env` file in the root of the project (you can copy `.env.example`) and add your Hyperliquid wallet private key and any agent keys. 4. **Configure strategies:** Edit `_data/strategies.json` to enable and configure your desired trading strategies. ### 2. Running the Bot To run the main application, which includes the dashboard and all background processes, execute the following command: ```bash python main_app.py ``` ## Development Conventions * **Modularity:** The project is divided into several scripts, each with a specific responsibility (e.g., `data_fetcher.py`, `trade_executor.py`). * **Configuration-driven:** Strategies are defined in `_data/strategies.json`, not hardcoded. This allows for easy management of strategies. * **Multi-processing:** The application uses the `multiprocessing` module to run different components in parallel for performance and stability. * **Strategies:** Custom strategies should inherit from the `BaseStrategy` class (defined in `strategies/base_strategy.py`) and implement the `calculate_signals` method. * **Documentation:** The `WIKI/` directory contains detailed documentation for the project. Start with `WIKI/SUMMARY.md`.