From 910601ba1d6e1af9201369859eda2502247149f0 Mon Sep 17 00:00:00 2001 From: misagh Date: Tue, 4 Dec 2018 20:50:35 +0100 Subject: [PATCH] =?UTF-8?q?in=20case=20exchange=20doesn=E2=80=99t=20return?= =?UTF-8?q?=20order=20info=20=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- freqtrade/freqtradebot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index ff73a036f..7894fc6cf 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -447,11 +447,11 @@ class FreqtradeBot(object): amount=amount, rate=buy_limit, time_in_force=self.strategy.order_time_in_force['buy']) order_id = order['id'] - order_info = order['info'] + order_info = order.get('info', {}) # check if order is expired (in case of FOC or IOC orders) # or rejected by the exchange. - if order_info['status'] == 'EXPIRED' or order_info['status'] == 'REJECTED': + if order_info.get('status', '') == 'EXPIRED' or order_info.get('status', '') == 'REJECTED': order_type = self.strategy.order_types['buy'] order_tif = self.strategy.order_time_in_force['buy'] status = order_info['status']