Update telegram.py
This commit is contained in:
parent
9b86054f6a
commit
0388fd401e
@ -286,9 +286,10 @@ class Telegram(RPCHandler):
|
|||||||
f" ({msg['gain']}: {msg['profit_amount']:.8f} {msg['stake_currency']}"
|
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_fill = msg['type'] == RPCMessageType.SELL_FILL
|
||||||
|
is_sub_trade = msg.get('sub_trade')
|
||||||
is_sub_profit = msg['profit_amount'] != msg.get('cumulative_profit')
|
is_sub_profit = msg['profit_amount'] != msg.get('cumulative_profit')
|
||||||
profit_prefix = ('Sub ' if is_sub_profit else 'Cumulative ') if msg['sub_trade'] else ''
|
profit_prefix = ('Sub ' if is_sub_profit else 'Cumulative ') if is_sub_trade else ''
|
||||||
if is_sub_profit and msg['sub_trade']:
|
if is_sub_profit and is_sub_trade:
|
||||||
if self._rpc._fiat_converter:
|
if self._rpc._fiat_converter:
|
||||||
cp_fiat = self._rpc._fiat_converter.convert_amount(
|
cp_fiat = self._rpc._fiat_converter.convert_amount(
|
||||||
msg['cumulative_profit'], msg['stake_currency'], msg['fiat_currency'])
|
msg['cumulative_profit'], msg['stake_currency'], msg['fiat_currency'])
|
||||||
|
Loading…
Reference in New Issue
Block a user