Don't use timeInForce for market orders
This commit is contained in:
parent
4705b7da0e
commit
0eb9dd5fe5
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user