amended L/S for status table

This commit is contained in:
Aezo Teo 2021-12-29 21:30:31 +08:00
parent 1f773671ed
commit b6092e2e3c

View File

@ -245,11 +245,10 @@ class RPC:
fiat_profit_sum = fiat_profit if isnan(fiat_profit_sum) \ fiat_profit_sum = fiat_profit if isnan(fiat_profit_sum) \
else fiat_profit_sum + fiat_profit else fiat_profit_sum + fiat_profit
trades_list.append([ trades_list.append([
trade.id, trade.id + f' {direction_str}',
trade.pair + ('*' if (trade.open_order_id is not None trade.pair + ('*' if (trade.open_order_id is not None
and trade.close_rate_requested is None) else '') and trade.close_rate_requested is None) else '')
+ ('**' if (trade.close_rate_requested is not None) else '') + ('**' if (trade.close_rate_requested is not None) else ''),
+ f' direction_str',
shorten_date(arrow.get(trade.open_date).humanize(only_distance=True)), shorten_date(arrow.get(trade.open_date).humanize(only_distance=True)),
profit_str profit_str
]) ])
@ -257,7 +256,7 @@ class RPC:
if self._fiat_converter: if self._fiat_converter:
profitcol += " (" + fiat_display_currency + ")" profitcol += " (" + fiat_display_currency + ")"
columns = ['ID', 'Pair (L/S)', 'Since', profitcol] columns = ['ID L/S', 'Pair', 'Since', profitcol]
return trades_list, columns, fiat_profit_sum return trades_list, columns, fiat_profit_sum
def _rpc_daily_profit( def _rpc_daily_profit(