Bot auto-update: src/main_ml.py
This commit is contained in:
parent
aacbeaf6df
commit
f34d0a49dd
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Reference in New Issue