feat: add Telegram notifications and configurable stop loss

- notify.py: buy/sell/error alerts via upbit_trading_jm_bot
- STOP_LOSS_PCT: trailing stop configurable via .env (default -5%)
- notify_buy/notify_sell called on every trade execution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
joungmin
2026-02-28 10:31:03 +09:00
parent 0713fb1e11
commit a799fbebbd
4 changed files with 60 additions and 1 deletions

View File

@@ -10,7 +10,7 @@ from . import trader
logger = logging.getLogger(__name__)
STOP_LOSS_PCT = 0.10 # 최고가 대비 -10% → 트레일링 스탑
STOP_LOSS_PCT = float(os.getenv("STOP_LOSS_PCT", "5")) / 100 # 최고가 대비 -N% → 트레일링 스탑
CHECK_INTERVAL = 10 # 10초마다 체크
# 타임 스탑: N시간 경과 후 수익률이 M% 미만이면 청산