Added error information output #28
@@ -89,8 +89,6 @@ class TelegramMessageHandler:
 | 
			
		||||
                        tg_id=tg_id, symbol=symbol, fee=safe_float(exec_fee)
 | 
			
		||||
                    )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                get_total_fee = user_auto_trading.total_fee
 | 
			
		||||
                total_fee = safe_float(exec_fee) + safe_float(get_total_fee)
 | 
			
		||||
 | 
			
		||||
@@ -177,12 +175,12 @@ class TelegramMessageHandler:
 | 
			
		||||
                        take_profit_price = max(take_profit_price, 0)
 | 
			
		||||
                        stop_loss_price = max(stop_loss_price, 0)
 | 
			
		||||
 | 
			
		||||
                    await set_tp_sl_for_position(tg_id=tg_id,
 | 
			
		||||
                    ress = await set_tp_sl_for_position(tg_id=tg_id,
 | 
			
		||||
                                                        symbol=symbol,
 | 
			
		||||
                                                        take_profit_price=take_profit_price,
 | 
			
		||||
                                                        stop_loss_price=stop_loss_price,
 | 
			
		||||
                                                        position_idx=0)
 | 
			
		||||
 | 
			
		||||
                    if ress:
 | 
			
		||||
                        take_profit_truncated = await truncate_float(take_profit_price, 6)
 | 
			
		||||
                        stop_loss_truncated = await truncate_float(stop_loss_price, 6)
 | 
			
		||||
 | 
			
		||||
@@ -190,6 +188,10 @@ class TelegramMessageHandler:
 | 
			
		||||
                                 f"Тейк-профит: {take_profit_truncated}\n"
 | 
			
		||||
                                 f"Стоп-лосс: {stop_loss_truncated}\n"
 | 
			
		||||
                                 )
 | 
			
		||||
                    else:
 | 
			
		||||
                        text += (f"Движение: {side_rus}\n"
 | 
			
		||||
                                 "Не удалось установить ТП и СЛ\n")
 | 
			
		||||
 | 
			
		||||
                else:
 | 
			
		||||
                    new_pnl = safe_float(pnl_series) + total_pnl
 | 
			
		||||
                    await rq.set_pnl_series_by_symbol(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user