stoploss_limit shall not use create_order()
It needs to handle exceptions differently
This commit is contained in:
parent
8a17615b5a
commit
ea179a8e38
@ -470,7 +470,12 @@ class Exchange(object):
|
|||||||
params = self._params.copy()
|
params = self._params.copy()
|
||||||
params.update({'stopPrice': stop_price})
|
params.update({'stopPrice': stop_price})
|
||||||
try:
|
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. '
|
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