From 02192f28cd62a1fe4b0bf95545f718079122b715 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 8 Apr 2020 07:56:21 +0200 Subject: [PATCH] Small stylistic updates --- freqtrade/rpc/rpc.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 35386760d..8645e466e 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -226,18 +226,14 @@ class RPC: for key, value in profit_days.items() ] - def _rpc_trade_history( - self, limit: int) -> Dict: + def _rpc_trade_history(self, limit: int) -> Dict: """ Returns the X last trades """ if limit > 0: trades = Trade.get_trades().order_by(Trade.id.desc()).limit(limit) else: trades = Trade.get_trades().order_by(Trade.id.desc()).all() - output = [] - - for trade in trades: - output.append(trade.to_json()) + output = [trade.to_json() for trade in trades] return { "trades": output,