From 6dae42d95df70043cd96470ee472844c9d7aa9af Mon Sep 17 00:00:00 2001 From: gcarq Date: Wed, 17 May 2017 23:36:08 +0200 Subject: [PATCH] show trade id in status command; minor bugfix --- main.py | 2 ++ rpc/telegram.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/main.py b/main.py index 3b5e1a94e..8613aa393 100755 --- a/main.py +++ b/main.py @@ -192,6 +192,8 @@ def create_trade(stake_amount: float, exchange): whitelist.remove(latest_trade.pair) logger.debug('Ignoring {} in pair whitelist'.format(latest_trade.pair)) for trade in open_trades: + if trade.pair not in whitelist: + continue whitelist.remove(trade.pair) logger.debug('Ignoring {} in pair whitelist'.format(trade.pair)) if not whitelist: diff --git a/rpc/telegram.py b/rpc/telegram.py index abd6310bc..d0d916db7 100644 --- a/rpc/telegram.py +++ b/rpc/telegram.py @@ -69,6 +69,7 @@ class TelegramHandler(object): orders = [o for o in orders if o['id'] == trade.open_order_id] order = orders[0] if orders else None message = """ +*Trade ID:* `{trade_id}` *Current Pair:* [{pair}](https://bittrex.com/Market/Index?MarketName={pair}) *Open Since:* `{date}` *Amount:* `{amount}` @@ -79,6 +80,7 @@ class TelegramHandler(object): *Current Profit:* `{current_profit}%` *Open Order:* `{open_order}` """.format( + trade_id=trade.id, pair=trade.pair.replace('_', '-'), date=arrow.get(trade.open_date).humanize(), open_rate=trade.open_rate,