stoploss_limit shall not use create_order()

It needs to handle exceptions differently
This commit is contained in:
Matthias 2019-08-25 09:43:10 +02:00
parent 8a17615b5a
commit ea179a8e38

View File

@ -470,7 +470,12 @@ class Exchange(object):
params = self._params.copy()
params.update({'stopPrice': stop_price})
try:
order = self.create_order(pair, ordertype, 'sell', amount, rate, params)
amount = self.symbol_amount_prec(pair, amount)
rate = self.symbol_price_prec(pair, rate)
order = self._api.create_order(pair, ordertype, 'sell',
amount, rate, params)
logger.info('stoploss limit order added for %s. '
'stop price: %s. limit: %s', pair, stop_price, rate)
return order