Automated crypto futures trading bot for Bybit exchange.
# 1. Setup
chmod +x setup.sh && ./setup.sh
# 2. Configure
nano .env # Add your API keys + Telegram bot token
# 3. Run
pm2 start ecosystem.config.js
# or manually:
source venv/bin/activate && python src/main.py
Bybit API: bybit.com โ Account โ API Management โ Create New Key
Telegram Bot: Message @BotFather โ /newbot โ copy token
src/
โโโ main.py # Entry point
โโโ config.py # All settings from .env
โโโ exchange/
โ โโโ client.py # Bybit API wrapper (orders, positions, market data)
โ โโโ order_manager.py # TP/SL placement and management
โ โโโ symbols.py # Instrument info cache
โโโ core/
โ โโโ position.py # Position tracking
โ โโโ risk.py # Risk management (sizing, limits)
โ โโโ trade_log.py # JSON trade journal
โโโ strategies/
โ โโโ base.py # Strategy interface (ABC)
โ โโโ (your strategies here)
โโโ bot/
โ โโโ telegram_bot.py # Alerts + commands
โ โโโ formatters.py # Message templates
โโโ utils/
โโโ logger.py # Logging with Vancouver timestamps
โโโ time_utils.py # Timezone helpers
src/strategies/my_strategy.pyBaseStrategy from src/strategies/base.pyscan(), on_signal(), check_position(), get_config()src/main.py/status โ overview + PnL/balance โ wallet balance/positions โ open positions/pnl [today|week|all] โ PnL stats/pause / /resume โ toggle tradingSee .env.example for all available settings.