Files
John Doe f19655cb08 Add Telegram notifications for trade signals and scan summaries
- Add requests + logging imports
- Add TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID to config
- Add send_telegram(), tg_signal(), tg_scan_summary() functions
- Configure SOCKS5h proxy (socks5h://127.0.0.1:6922) for Telegram API
- Send tg_signal() on order filled/failed in scan_and_trade()
- Send tg_scan_summary() after each scan cycle
- Update config.json with bot token and chat ID
2026-04-18 16:53:02 +08:00

27 lines
490 B
Bash
Executable File

#!/bin/bash
# Stop bot_v3
PID=$(pgrep -f "bot_v3.py run" 2>/dev/null)
if [ -z "$PID" ]; then
echo "bot_v3 is not running!"
exit 1
fi
echo "Stopping bot_v3 (PID: $PID)..."
kill $PID
# Wait for process to stop
for i in {1..5}; do
if ! pgrep -f "bot_v3.py run" > /dev/null 2>&1; then
echo "bot_v3 stopped successfully!"
exit 0
fi
sleep 1
done
# Force kill if still running
echo "Force killing bot_v3..."
kill -9 $PID 2>/dev/null
echo "bot_v3 stopped!"