From e981d644e1c0102e808ec55a91f395cb2a5aab74 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 16 Feb 2022 19:24:59 +0100 Subject: [PATCH] Add toto-lev for order-leverage --- freqtrade/persistence/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/persistence/models.py b/freqtrade/persistence/models.py index 29761fdf5..bd71ee58f 100644 --- a/freqtrade/persistence/models.py +++ b/freqtrade/persistence/models.py @@ -161,6 +161,8 @@ class Order(_DECL_BASE): self.average = order.get('average', self.average) self.remaining = order.get('remaining', self.remaining) self.cost = order.get('cost', self.cost) + # TODO-lev: ccxt order objects don't contain leverage. + # Therefore the below will always be 1.0 - which is wrong. self.leverage = order.get('leverage', self.leverage) if 'timestamp' in order and order['timestamp'] is not None: