From 611b48dbb99e86a53b948a5e468767d046e1459d Mon Sep 17 00:00:00 2001 From: misagh Date: Wed, 16 Jan 2019 16:15:36 +0100 Subject: [PATCH] fix return value from info hash: value is in string --- freqtrade/freqtradebot.py | 2 +- freqtrade/tests/test_freqtradebot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index dc5f3d8ad..9b5ab4bba 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -665,7 +665,7 @@ class FreqtradeBot(object): :return: None """ - if trade.stop_loss > order['info']['stopPrice']: + if trade.stop_loss > float(order['info']['stopPrice']): # we check if the update is neccesary update_beat = self.strategy.order_types['stoploss_on_exchange_interval'] if (datetime.utcnow() - trade.stoploss_last_update).total_seconds() > update_beat: diff --git a/freqtrade/tests/test_freqtradebot.py b/freqtrade/tests/test_freqtradebot.py index 569477fb1..6c25b1a7f 100644 --- a/freqtrade/tests/test_freqtradebot.py +++ b/freqtrade/tests/test_freqtradebot.py @@ -1066,7 +1066,7 @@ def test_handle_stoploss_on_exchange_trailing(mocker, default_conf, fee, caplog, 'price': 3, 'average': 2, 'info': { - 'stopPrice': 0.000011134 + 'stopPrice': '0.000011134' } })