From 83e1067af7a369343aef54b06de8b9579207ea60 Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sun, 12 Sep 2021 23:39:08 -0600 Subject: [PATCH] leverage to exchange.create_order --- freqtrade/freqtradebot.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 192152b5b..f94ba599b 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -613,9 +613,15 @@ class FreqtradeBot(LoggingMixin): logger.info(f"User requested abortion of {name.lower()}ing {pair}") return False amount = self.exchange.amount_to_precision(pair, amount) - order = self.exchange.create_order(pair=pair, ordertype=order_type, side=side, - amount=amount, rate=enter_limit_requested, - time_in_force=time_in_force) + order = self.exchange.create_order( + pair=pair, + ordertype=order_type, + side=side, + amount=amount, + rate=enter_limit_requested, + time_in_force=time_in_force, + leverage=leverage + ) order_obj = Order.parse_from_ccxt_object(order, pair, side) order_id = order['id'] order_status = order.get('status', None)