From 0357ae545d33a1ce12cf526788a4f04f30dc96ed Mon Sep 17 00:00:00 2001 From: misagh Date: Wed, 14 Nov 2018 10:32:26 +0100 Subject: [PATCH] first example of code to be extracted --- freqtrade/freqtradebot.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 61285542a..209e34cfc 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -459,6 +459,9 @@ class FreqtradeBot(object): stake_currency = self.config['stake_currency'] fiat_currency = self.config.get('fiat_display_currency', None) + + # THE LOGIC TO BE EXTRACTED + ###################################################### # self.execution.execute_buy(pair, stake_amount, price) if price: @@ -478,6 +481,9 @@ class FreqtradeBot(object): amount = stake_amount / buy_limit order_id = self.exchange.buy(pair, buy_limit, amount)['id'] + # THE ABOVE BLOCK WILL BE REPLACED BY THE FOLLWING LINE: + # order_id = self.execution.execute_buy(pair, stake_amount, price) + ###################################################### self.rpc.send_msg({ 'type': RPCMessageType.BUY_NOTIFICATION,