diff --git a/.gitignore b/.gitignore index 7e60908..5942cd3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ cache/ data/ __pycache__/ .venv/ +.env +.DS_Store diff --git a/config.yaml b/config.yaml index d771f03..6f81c49 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -mode: paper # paper | live +mode: live # paper | live capital: 0 # 0 = auto-fetch from exchange balance timeframe: "5m" diff --git a/deploy/scalp-bot.service b/deploy/scalp-bot.service new file mode 100644 index 0000000..e3c60a5 --- /dev/null +++ b/deploy/scalp-bot.service @@ -0,0 +1,22 @@ +[Unit] +Description=scalp-bot ETH futures scalper (Bybit) +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +WorkingDirectory=/home/anor/scalp-bot +EnvironmentFile=/home/anor/scalp-bot/.env +ExecStart=/home/anor/scalp-bot/.venv/bin/python cli.py daemon +Restart=on-failure +RestartSec=30 + +KillSignal=SIGTERM +TimeoutStopSec=30 + +StandardOutput=journal +StandardError=journal +SyslogIdentifier=scalp-bot + +[Install] +WantedBy=default.target diff --git a/deploy/update.sh b/deploy/update.sh new file mode 100755 index 0000000..9262418 --- /dev/null +++ b/deploy/update.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail +cd /home/anor/scalp-bot +git pull --ff-only +source .venv/bin/activate +pip install -r requirements.txt --quiet +echo "Updated. Restart: systemctl --user restart scalp-bot"