Have profit return time in timestamp

This commit is contained in:
Matthias 2020-05-24 08:58:26 +02:00
parent 859b619a0b
commit 811e23e3da
1 changed files with 2 additions and 0 deletions

View File

@ -314,7 +314,9 @@ class RPC:
'profit_all_fiat': profit_all_fiat,
'trade_count': len(trades),
'first_trade_date': arrow.get(trades[0].open_date).humanize(),
'first_trade_timestamp': int(trades[0].open_date.timestamp() * 1000),
'latest_trade_date': arrow.get(trades[-1].open_date).humanize(),
'latest_trade_timestamp': int(trades[-1].open_date.timestamp() * 1000),
'avg_duration': str(timedelta(seconds=sum(durations) / num)).split('.')[0],
'best_pair': bp_pair,
'best_rate': round(bp_rate * 100, 2),