fix: restore entry_price and entry_quantity on position recovery
Made-with: Cursor
This commit is contained in:
@@ -41,6 +41,8 @@ class TradingBot:
|
||||
if position is not None:
|
||||
amt = float(position["positionAmt"])
|
||||
self.current_trade_side = "LONG" if amt > 0 else "SHORT"
|
||||
self._entry_price = float(position["entryPrice"])
|
||||
self._entry_quantity = abs(amt)
|
||||
entry = float(position["entryPrice"])
|
||||
logger.info(
|
||||
f"기존 포지션 복구: {self.current_trade_side} | "
|
||||
|
||||
Reference in New Issue
Block a user