Don't use timeInForce for market orders

This commit is contained in:
Matthias 2019-03-11 20:30:36 +01:00
parent 4705b7da0e
commit 0eb9dd5fe5

View File

@ -352,7 +352,7 @@ class Exchange(object):
return dry_order return dry_order
params = self._params.copy() params = self._params.copy()
if time_in_force != 'gtc': if time_in_force != 'gtc' and ordertype != 'market':
params.update({'timeInForce': time_in_force}) params.update({'timeInForce': time_in_force})
return self.create_order(pair, ordertype, 'buy', amount, rate, params) return self.create_order(pair, ordertype, 'buy', amount, rate, params)
@ -365,7 +365,7 @@ class Exchange(object):
return dry_order return dry_order
params = self._params.copy() params = self._params.copy()
if time_in_force != 'gtc': if time_in_force != 'gtc' and ordertype != 'market':
params.update({'timeInForce': time_in_force}) params.update({'timeInForce': time_in_force})
return self.create_order(pair, ordertype, 'sell', amount, rate, params) return self.create_order(pair, ordertype, 'sell', amount, rate, params)