leverage to exchange.create_order

This commit is contained in:
Sam Germain 2021-09-12 23:39:08 -06:00
parent 1d7a8f667a
commit 83e1067af7

View File

@ -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)