File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -281,18 +281,26 @@ def update_dashboard_all_open_trades(self):
281281 client_dict = self .app .client_dict
282282 client_dfs = self .app .client_dfs
283283
284+ trading_mode = "spot"
285+
284286 all_open_df = pd .DataFrame ()
285287 for n , cl in client_dict .items ():
288+ # if any bots are in futures mode, add leverage column
289+ tm = cl .get_client_config ().get ("trading_mode" , "spot" )
290+ if tm != "spot" :
291+ trading_mode = tm
286292 if cl .name in client_dfs and "op_data" in client_dfs [cl .name ]:
287293 data = client_dfs [cl .name ]["op_data" ].copy ()
288294 if not data .empty :
289295 all_open_df = pd .concat ([all_open_df , data ])
290296
291- row_data = self ._render_open_trade_data (all_open_df )
297+ row_data = self ._render_open_trade_data (
298+ all_open_df , trading_mode = trading_mode
299+ )
292300
293301 dt = self .query_one ("#all-open-trades-table" )
294302 table = fth .dash_open_trades_table (
295- row_data , trading_mode = cl . get_client_config (). get ( " trading_mode" )
303+ row_data , trading_mode = trading_mode
296304 )
297305
298306 worker = get_current_worker ()
You can’t perform that action at this time.
0 commit comments