← Назад#!/bin/bash
set -e
echo "=== Bybit Trading Bot Setup ==="
# Create venv
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
python3 -m venv venv
fi
# Activate and install
echo "Installing dependencies..."
source venv/bin/activate
pip install -r requirements.txt
# Copy .env if not exists
if [ ! -f ".env" ]; then
cp .env.example .env
echo ""
echo "Created .env from .env.example"
echo "EDIT .env with your API keys before running!"
else
echo ".env already exists, skipping copy"
fi
# Create data dir
mkdir -p data
echo ""
echo "=== Setup complete ==="
echo "1. Edit .env with your Bybit API keys + Telegram bot token"
echo "2. Run: pm2 start ecosystem.config.js"
echo " or: source venv/bin/activate && python src/main.py"