fix open orders telegram reporting

This commit is contained in:
Matthias
2023-09-09 09:39:52 +02:00
parent 9e1f7dc6f7
commit 01ff054a0b
2 changed files with 4 additions and 4 deletions

View File

@@ -181,7 +181,7 @@ class RPC:
for oo in trade.open_orders
if oo.ft_order_side not in ['stoploss']
]
oo_details = ''.join(map(str, oo_details_lst))
oo_details = ', '.join(oo_details_lst)
total_profit_abs = 0.0
total_profit_ratio: Optional[float] = None

View File

@@ -663,10 +663,10 @@ class Telegram(RPCHandler):
("`({stop_loss_ratio:.2%})`" if r['stop_loss_ratio'] else ""))
lines.append("*Stoploss distance:* `{stoploss_current_dist:.8g}` "
"`({stoploss_current_dist_ratio:.2%})`")
for order in r.get('open_orders', []):
if r.get('open_orders'):
lines.append(
f"*Open Order:* `{order}`"
+ "- `{exit_order_status}`" if r['exit_order_status'] else "")
"*Open Order:* `{open_orders}`"
+ ("- `{exit_order_status}`" if r['exit_order_status'] else ""))
lines_detail = self._prepare_order_details(
r['orders'], r['quote_currency'], r['is_open'])