mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Move total_trades to explicit variable
This commit is contained in:
parent
1947fab3d7
commit
d723979c42
|
@ -388,12 +388,13 @@ class RPC:
|
||||||
Trade.close_date.desc())
|
Trade.close_date.desc())
|
||||||
|
|
||||||
output = [trade.to_json() for trade in trades]
|
output = [trade.to_json() for trade in trades]
|
||||||
|
total_trades = Trade.get_trades([Trade.is_open.is_(False)]).count()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"trades": output,
|
"trades": output,
|
||||||
"trades_count": len(output),
|
"trades_count": len(output),
|
||||||
"offset": offset,
|
"offset": offset,
|
||||||
"total_trades": Trade.get_trades([Trade.is_open.is_(False)]).count(),
|
"total_trades": total_trades,
|
||||||
}
|
}
|
||||||
|
|
||||||
def _rpc_stats(self) -> Dict[str, Any]:
|
def _rpc_stats(self) -> Dict[str, Any]:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user