diff --git a/scripts/rest_client.py b/scripts/rest_client.py index 144d428e5..6c8e13f2c 100755 --- a/scripts/rest_client.py +++ b/scripts/rest_client.py @@ -340,12 +340,14 @@ class FtRestClient(): :param limit: Limit result to the last n candles. :return: json object """ - return self._get("pair_candles", params={ + params = { "pair": pair, "timeframe": timeframe, - "limit": limit, - }) - + } + if limit: + params['limit'] = limit + return self._get("pair_candles", params=params) + def pair_history(self, pair, timeframe, strategy, timerange=None): """Return historic, analyzed dataframe