Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ftui/screens/dashboard_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,26 @@ def update_dashboard_all_open_trades(self):
client_dict = self.app.client_dict
client_dfs = self.app.client_dfs

trading_mode = "spot"

all_open_df = pd.DataFrame()
for n, cl in client_dict.items():
# if any bots are in futures mode, add leverage column
tm = cl.get_client_config().get("trading_mode", "spot")
if tm != "spot":
trading_mode = tm
if cl.name in client_dfs and "op_data" in client_dfs[cl.name]:
data = client_dfs[cl.name]["op_data"].copy()
if not data.empty:
all_open_df = pd.concat([all_open_df, data])

row_data = self._render_open_trade_data(all_open_df)
row_data = self._render_open_trade_data(
all_open_df, trading_mode=trading_mode
)

dt = self.query_one("#all-open-trades-table")
table = fth.dash_open_trades_table(
row_data, trading_mode=cl.get_client_config().get("trading_mode")
row_data, trading_mode=trading_mode
)

worker = get_current_worker()
Expand Down