Update rest_client.py

Add fix for forceenter to avoid passing None prices back to the API
This commit is contained in:
Robert Davey 2023-05-10 10:32:00 +01:00 committed by GitHub
parent deeca484d8
commit 3a7e41e177
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,8 +279,9 @@ class FtRestClient():
""" """
data = {"pair": pair, data = {"pair": pair,
"side": side, "side": side,
"price": price,
} }
if price:
params['price'] = price
return self._post("forceenter", data=data) return self._post("forceenter", data=data)
def forceexit(self, tradeid, ordertype=None, amount=None): def forceexit(self, tradeid, ordertype=None, amount=None):