43 lines
1.3 KiB
Markdown
43 lines
1.3 KiB
Markdown
Setup and Installation
|
|
|
|
Prerequisites
|
|
|
|
- Python 3.11+ (project uses modern dependencies)
|
|
- Git (optional)
|
|
- A Hyperliquid account and an activated main wallet if you want to authorize agents and trade
|
|
|
|
Virtual environment
|
|
|
|
1. Create a virtual environment:
|
|
|
|
python -m venv .venv
|
|
|
|
2. Activate the virtual environment (PowerShell on Windows):
|
|
|
|
.\.venv\Scripts\Activate.ps1
|
|
|
|
3. Upgrade pip and install dependencies:
|
|
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
Configuration
|
|
|
|
- Copy `.env.example` to `.env` and set the following variables as required:
|
|
- MAIN_WALLET_PRIVATE_KEY (used by `create_agent.py` to authorize agents)
|
|
- MAIN_WALLET_ADDRESS (used by `trade_executor.py`)
|
|
- AGENT_PRIVATE_KEY or per-agent keys like `EXECUTOR_SCALPER_AGENT_PK`
|
|
- Optional: COINGECKO_API_KEY for `market_cap_fetcher.py` to avoid rate limits
|
|
|
|
Data directory
|
|
|
|
- The project writes and reads data from the `_data/` folder. Ensure the directory exists and is writable by the user running the scripts.
|
|
|
|
Quick test
|
|
|
|
After installing packages, run `list_coins.py` in a dry run to verify connectivity to the Hyperliquid info API:
|
|
|
|
python list_coins.py
|
|
|
|
If you encounter import errors, ensure the virtual environment is active and the `requirements.txt` dependencies are installed.
|