fix(dashboard): use actual leverage from bot_status instead of hardcoded 10x

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
21in7
2026-03-18 11:07:54 +09:00
parent 4792b0f9cf
commit 8c1cd0422f

View File

@@ -428,7 +428,11 @@ class LogParser:
leverage=None, sl=None, tp=None, is_recovery=False,
rsi=None, macd_hist=None, atr=None):
if leverage is None:
leverage = 10
row = self.conn.execute(
"SELECT value FROM bot_status WHERE key=?",
(f"{symbol}:leverage",),
).fetchone()
leverage = int(row["value"]) if row else 10
# 중복 체크 — 같은 심볼+방향의 OPEN 포지션이 이미 있으면 스킵
current = self._current_positions.get(symbol)