Convert to % as part of RPC to allow users to use unrounded ratio

This commit is contained in:
Matthias
2019-10-30 09:59:54 +01:00
parent 5ed7771148
commit b7b1e66c6e
3 changed files with 10 additions and 7 deletions

View File

@@ -428,12 +428,15 @@ class RPC:
else:
return None
def _rpc_performance(self) -> List[Dict]:
def _rpc_performance(self) -> List[Dict[str, Any]]:
"""
Handler for performance.
Shows a performance statistic from finished trades
"""
return Trade.get_overall_performance()
pair_rates = Trade.get_overall_performance()
# Round and convert to %
[x.update({'profit': round(x['profit'] * 100, 2)}) for x in pair_rates]
return pair_rates
def _rpc_count(self) -> Dict[str, float]:
""" Returns the number of trades running """