From 3a7e41e1777dc4835b7d1e3ed35318d829f88844 Mon Sep 17 00:00:00 2001 From: Robert Davey Date: Wed, 10 May 2023 10:32:00 +0100 Subject: [PATCH] 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):