Update telegram.py

This commit is contained in:
Kavinkumar 2022-03-11 00:35:35 +05:30 committed by GitHub
parent b6c1ab8933
commit dab9b8006c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,12 +279,12 @@ class Telegram(RPCHandler):
msg['profit_fiat'] = self._rpc._fiat_converter.convert_amount(
msg['profit_amount'], msg['stake_currency'], msg['fiat_currency'])
msg['profit_extra'] = (
f" / {msg['profit_fiat']:.3f} {msg['fiat_currency']})")
f" / {msg['profit_fiat']:.3f} {msg['fiat_currency']}")
else:
msg['profit_extra'] = ''
msg['profit_extra'] = (
f" ({msg['gain']}: {msg['profit_amount']:.8f} {msg['stake_currency']}"
f"{msg['profit_extra']}")
f"{msg['profit_extra']})")
is_fill = msg['type'] == RPCMessageType.SELL_FILL
is_sub_trade = msg.get('sub_trade')
is_sub_profit = msg['profit_amount'] != msg.get('cumulative_profit')