undo kraken specific changes
This commit is contained in:
parent
8ed3658447
commit
54d5bce445
@ -304,14 +304,11 @@ class Exchange(object):
|
|||||||
amount = self.symbol_amount_prec(pair, amount)
|
amount = self.symbol_amount_prec(pair, amount)
|
||||||
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
|
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
|
||||||
|
|
||||||
params = {}
|
|
||||||
if time_in_force != 'gtc':
|
if time_in_force != 'gtc':
|
||||||
params.update({'timeInForce': time_in_force})
|
return self._api.create_order(pair, ordertype, 'buy', amount, rate)
|
||||||
if self.id == "kraken":
|
else:
|
||||||
params.update({"trading_agreement": "agree"})
|
|
||||||
|
|
||||||
return self._api.create_order(pair, ordertype, 'buy',
|
return self._api.create_order(pair, ordertype, 'buy',
|
||||||
amount, rate, params)
|
amount, rate, {'timeInForce': time_in_force})
|
||||||
|
|
||||||
except ccxt.InsufficientFunds as e:
|
except ccxt.InsufficientFunds as e:
|
||||||
raise DependencyException(
|
raise DependencyException(
|
||||||
@ -350,14 +347,11 @@ class Exchange(object):
|
|||||||
amount = self.symbol_amount_prec(pair, amount)
|
amount = self.symbol_amount_prec(pair, amount)
|
||||||
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
|
rate = self.symbol_price_prec(pair, rate) if ordertype != 'market' else None
|
||||||
|
|
||||||
params = {}
|
|
||||||
if time_in_force != 'gtc':
|
if time_in_force != 'gtc':
|
||||||
params.update({'timeInForce': time_in_force})
|
return self._api.create_order(pair, ordertype, 'sell', amount, rate)
|
||||||
if self.id == "kraken":
|
else:
|
||||||
params.update({"trading_agreement": "agree"})
|
|
||||||
|
|
||||||
return self._api.create_order(pair, ordertype, 'sell',
|
return self._api.create_order(pair, ordertype, 'sell',
|
||||||
amount, rate, params)
|
amount, rate, {'timeInForce': time_in_force})
|
||||||
|
|
||||||
except ccxt.InsufficientFunds as e:
|
except ccxt.InsufficientFunds as e:
|
||||||
raise DependencyException(
|
raise DependencyException(
|
||||||
@ -409,12 +403,9 @@ class Exchange(object):
|
|||||||
return self._dry_run_open_orders[order_id]
|
return self._dry_run_open_orders[order_id]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
params = {'stopPrice': stop_price}
|
|
||||||
if self.id == "kraken":
|
|
||||||
params.update({"trading_agreement": "agree"})
|
|
||||||
|
|
||||||
order = self._api.create_order(pair, 'stop_loss_limit', 'sell',
|
order = self._api.create_order(pair, 'stop_loss_limit', 'sell',
|
||||||
amount, rate, params)
|
amount, rate, {'stopPrice': stop_price})
|
||||||
logger.info('stoploss limit order added for %s. '
|
logger.info('stoploss limit order added for %s. '
|
||||||
'stop price: %s. limit: %s' % (pair, stop_price, rate))
|
'stop price: %s. limit: %s' % (pair, stop_price, rate))
|
||||||
return order
|
return order
|
||||||
|
Loading…
Reference in New Issue
Block a user