Return /profit even if no trade is closed

This commit is contained in:
Matthias
2020-05-29 09:03:48 +02:00
parent 62ac5a9914
commit 6261aef314
4 changed files with 22 additions and 18 deletions

View File

@@ -546,6 +546,7 @@ class Trade(_DECL_BASE):
def get_best_pair():
"""
Get best pair with closed trade.
:returns: Tuple containing (pair, profit_sum)
"""
best_pair = Trade.session.query(
Trade.pair, func.sum(Trade.close_profit).label('profit_sum')