fix: save portfolio data to database

Portfolio (cash balance, position, etc.) is now saved to DB
during simulation so it persists and shows in frontend.
This commit is contained in:
shokollm
2026-04-12 07:41:56 +00:00
parent 6c39e4e89d
commit a8e0baf0c0
2 changed files with 9 additions and 2 deletions

View File

@@ -95,6 +95,7 @@ class Simulation(Base):
signals = Column(JSON)
klines = Column(JSON) # Price data for chart display
trade_log = Column(JSON) # Trade activity log
portfolio = Column(JSON) # Portfolio data
bot = relationship("Bot", back_populates="simulations")