From e9e76da054a27a1b0c71dc94ac291db46947129c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20=C3=98ien=20Langvand?= Date: Sun, 17 Sep 2017 18:42:42 +0200 Subject: [PATCH] add whitelist to execute_sell and append sold pair to it --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 493be3494..68723bea8 100755 --- a/main.py +++ b/main.py @@ -94,8 +94,10 @@ def execute_sell(trade: Trade, current_rate: float) -> None: # Get available balance currency = trade.pair.split('_')[1] balance = exchange.get_balance(currency) + whitelist = _CONF[trade.exchange.name.lower()]['pair_whitelist'] profit = trade.exec_sell_order(current_rate, balance) + whitelist.append(trade.pair) message = '*{}:* Selling [{}]({}) at rate `{:f} (profit: {}%)`'.format( trade.exchange.name, trade.pair.replace('_', '/'),