Step-by-step instructions for installing and setting up the AgentX Crypto Trading Framework
Before installing AgentX, ensure your system meets the following requirements:
Component | Minimum | Recommended |
---|---|---|
Operating System | Linux (Ubuntu 20.04+), macOS (10.15+), or Windows 10/11 | Linux (Ubuntu 22.04+) |
CPU | 2+ cores | 4+ cores |
Memory | 8GB RAM | 16GB RAM |
Storage | 10GB free disk space | 20GB+ free disk space |
Python | Version 3.10+ | Version 3.11+ |
Node.js | Version 20.0+ | Version 20.0+ |
Network | Stable internet connection | High-speed internet connection |
# Update package lists
sudo apt update
# Install Python and pip
sudo apt install python3 python3-pip python3-venv
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
# Install development tools
sudo apt install build-essential git
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python@3.10
# Install Node.js
brew install node@20
# Install git
brew install git
For Windows, download and install the following:
# Clone the repository
git clone https://github.com/yourusername/agentx.git
# Navigate to the project directory
cd agentx
# Create a virtual environment
python3 -m venv venv
# Activate the virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Install Python dependencies
pip install -r requirements.txt
# Navigate to the dashboard directory
cd src/dashboard
# Install Node.js dependencies
npm install
# Return to the project root
cd ../..
# Create a local configuration file
cp config/default.json config/local.json
Edit config/local.json
with your preferred text editor and update the following:
# Create logs directory
mkdir -p logs/agents
# Ensure virtual environment is activated
# On Linux/macOS:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
# Run the main application
python src/main.py
Open your web browser and navigate to:
http://localhost:5000
The main configuration file is located at config/local.json
. Here's an example configuration:
{
"system": {
"name": "AgentX Trading System",
"update_interval": 1.0,
"log_level": "INFO"
},
"agents": {
"executive": {
"chief_coordinator": {
"update_frequency": 0.5,
"allocation_limits": {
"max_per_asset": 0.2,
"max_per_strategy": 0.3
}
},
"risk_manager": {
"update_frequency": 0.5,
"risk_limits": {
"max_drawdown": 0.1,
"max_volatility": 0.2,
"max_correlation": 0.7
}
},
"performance_analyst": {
"update_frequency": 0.5,
"metrics": ["returns", "sharpe", "drawdown", "win_rate"]
}
},
"strategy": {
"market_research": {
"update_frequency": 0.5,
"data_sources": ["twitter", "news", "reddit"]
},
"technical_analysis": {
"update_frequency": 0.5,
"indicators": ["sma", "ema", "rsi", "macd"]
},
"fundamental_analysis": {
"update_frequency": 0.5,
"metrics": ["active_addresses", "nvt_ratio", "development_activity"]
},
"macro_analysis": {
"update_frequency": 0.5,
"indicators": ["market_dominance", "correlation_traditional", "risk_metrics"]
},
"correlation_agent": {
"update_frequency": 0.5,
"correlation_window": 30,
"min_correlation": 0.5
}
},
"execution": {
"trade_execution": {
"update_frequency": 0.5,
"supported_strategies": ["market", "limit", "twap", "vwap", "iceberg"]
},
"liquidity_monitoring": {
"update_frequency": 0.5,
"liquidity_thresholds": {
"low": 100000,
"medium": 1000000,
"high": 10000000
}
},
"order_book": {
"update_frequency": 0.5,
"order_book_depth_levels": 10
}
}
},
"exchanges": {
"binance": {
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET"
},
"coinbase": {
"api_key": "YOUR_API_KEY",
"api_secret": "YOUR_API_SECRET"
}
},
"assets": {
"monitored_pairs": [
"BTC/USDT", "ETH/USDT", "BNB/USDT", "SOL/USDT", "ADA/USDT"
]
}
}
If you prefer using Docker, follow these steps:
Follow the instructions for your operating system at docker.com.
# Clone the repository
git clone https://github.com/yourusername/agentx.git
# Navigate to the project directory
cd agentx
# Create a local configuration file
cp config/default.json config/local.json
Edit config/local.json
with your preferred text editor as described in the Configuration section.
# Build and start the containers
docker-compose up -d
# View logs
docker-compose logs -f
Open your web browser and navigate to:
http://localhost:5000
If you encounter errors during Python dependencies installation:
# Update pip
pip install --upgrade pip
# Install wheel
pip install wheel
# Try installing dependencies again
pip install -r requirements.txt
If you encounter errors during Node.js dependencies installation:
# Clear npm cache
npm cache clean --force
# Try installing dependencies again
npm install
If you encounter permission issues:
# Fix permissions
chmod +x src/main.py
# If using Docker
sudo chown -R $USER:$USER .
If port 5000 is already in use:
src/dashboard.py
and change the port number (e.g., from 5000 to 5001)To verify that the installation was successful:
After successful installation:
If you encounter any issues during installation:
logs
directory