added additional column for the status table to see current stake currency value

This commit is contained in:
Gert Wohlgemuth 2018-05-01 21:34:16 -07:00
parent 743a1f1604
commit 3e27232e9b
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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: