show trade id in status command; minor bugfix
This commit is contained in:
parent
d572b7bdbe
commit
6dae42d95d
2
main.py
2
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:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user