mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-07-27 23:37:45 +00:00
Update src/trading/position.py
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
@@ -156,5 +156,10 @@ class Position:
|
||||
|
||||
def __str__(self) -> str:
|
||||
"""String representation of position."""
|
||||
status = "ACTIVE" if self.is_active else f"CLOSED ({self.exit_reason.value})"
|
||||
if self.is_active:
|
||||
status = "ACTIVE"
|
||||
elif self.exit_reason:
|
||||
status = f"CLOSED ({self.exit_reason.value})"
|
||||
else:
|
||||
status = "CLOSED (UNKNOWN)"
|
||||
return f"Position({self.symbol}: {self.quantity:.6f} @ {self.entry_price:.8f} SOL - {status})"
|
||||
Reference in New Issue
Block a user