From 3e27232e9b821030c1c8087892e98f993c45a4de Mon Sep 17 00:00:00 2001 From: Gert Wohlgemuth Date: Tue, 1 May 2018 21:34:16 -0700 Subject: [PATCH] added additional column for the status table to see current stake currency value --- freqtrade/rpc/rpc.py | 5 +++-- freqtrade/tests/rpc/test_rpc.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 860d3ba43..5ad7b6b03 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -98,10 +98,11 @@ class RPC(object): trade.id, trade.pair, shorten_date(arrow.get(trade.open_date).humanize(only_distance=True)), - '{:.2f}%'.format(100 * trade.calc_profit_percent(current_rate)) + '{:.2f}%'.format(100 * trade.calc_profit_percent(current_rate)), + '{:.6f}'.format(trade.amount * current_rate) ]) - columns = ['ID', 'Pair', 'Since', 'Profit'] + columns = ['ID', 'Pair', 'Since', 'Profit', 'Value'] df_statuses = DataFrame.from_records(trades_list, columns=columns) df_statuses = df_statuses.set_index(columns[0]) # The style used throughout is to return a tuple diff --git a/freqtrade/tests/rpc/test_rpc.py b/freqtrade/tests/rpc/test_rpc.py index 84b06bee2..01840dfd3 100644 --- a/freqtrade/tests/rpc/test_rpc.py +++ b/freqtrade/tests/rpc/test_rpc.py @@ -104,7 +104,7 @@ def test_rpc_status_table(default_conf, ticker, mocker) -> None: assert 'just now' in result['Since'].all() assert 'BTC_ETH' in result['Pair'].all() assert '-0.59%' in result['Profit'].all() - + assert 'Value' in result def test_rpc_daily_profit(default_conf, update, ticker, limit_buy_order, limit_sell_order, mocker)\ -> None: