From 3a7e41e1777dc4835b7d1e3ed35318d829f88844 Mon Sep 17 00:00:00 2001 From: Robert Davey Date: Wed, 10 May 2023 10:32:00 +0100 Subject: [PATCH 1/2] Update rest_client.py Add fix for forceenter to avoid passing None prices back to the API --- scripts/rest_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/rest_client.py b/scripts/rest_client.py index ccffe7f5f..d301d06e6 100755 --- a/scripts/rest_client.py +++ b/scripts/rest_client.py @@ -279,8 +279,9 @@ class FtRestClient(): """ data = {"pair": pair, "side": side, - "price": price, } + if price: + params['price'] = price return self._post("forceenter", data=data) def forceexit(self, tradeid, ordertype=None, amount=None): From 242247be47a629efef0d412e8b27a28e5aae944f Mon Sep 17 00:00:00 2001 From: Robert Davey Date: Wed, 10 May 2023 10:56:14 +0100 Subject: [PATCH 2/2] Fix var name --- 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 d301d06e6..0772af269 100755 --- a/scripts/rest_client.py +++ b/scripts/rest_client.py @@ -281,7 +281,7 @@ class FtRestClient(): "side": side, } if price: - params['price'] = price + data['price'] = price return self._post("forceenter", data=data) def forceexit(self, tradeid, ordertype=None, amount=None):