From aa283a04478075a331d64f9fff1f2f310575c463 Mon Sep 17 00:00:00 2001 From: froggleston Date: Sun, 12 Mar 2023 12:44:12 +0000 Subject: [PATCH 1/2] Fix None limit on pair_candles RPC call --- scripts/rest_client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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 From 5bfee44bba51b0005ec126583ff343d073ba897c Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 12 Mar 2023 15:24:27 +0100 Subject: [PATCH 2/2] Whitespace fix --- scripts/rest_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/rest_client.py b/scripts/rest_client.py index 6c8e13f2c..196542780 100755 --- a/scripts/rest_client.py +++ b/scripts/rest_client.py @@ -347,7 +347,7 @@ class FtRestClient(): 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