Bot auto-update: src/main_ml.py

This commit is contained in:
Marc Blatter 2026-07-04 23:50:01 +02:00
parent aacbeaf6df
commit f34d0a49dd
1 changed files with 6 additions and 6 deletions

View File

@ -216,19 +216,19 @@ Reports: Alle 3h via Telegram 📊"""
# ROUND QUANTITY TO STEP SIZE
qty_rounded = self._round_quantity(qty, pair)
# Place SL order
order = self.client.order_take_profit(
# Place SL order using correct Binance method
order = self.client.create_order(
symbol=pair,
side='SELL',
type='STOP_LOSS',
type='STOP_LOSS_LIMIT',
timeInForce='GTC',
quantity=qty_rounded,
stopPrice=sl_price,
price=sl_price
price=sl_price,
stopPrice=sl_price
)
logger.info(f"🛡️ SL: {pair} x{qty_rounded:.8f} @ ${sl_price:.4f} (-{self.STOP_LOSS_PERCENT}%)")
except BinanceAPIException as e:
except Exception as e:
logger.error(f"SL Error {pair}: {e}")
async def monitor_positions(self):