move exchange-specific order-parsing to exchange class

Related to stoploss_on_exchange in combination with trailing stoploss.

Binance contains stopPrice in the info, while kraken returns the same
value as "price".
This commit is contained in:
Matthias
2020-01-19 19:54:30 +01:00
parent 7a22aaa111
commit cf9331919f
7 changed files with 55 additions and 5 deletions

View File

@@ -718,8 +718,7 @@ class FreqtradeBot:
:param order: Current on exchange stoploss order
:return: None
"""
if trade.stop_loss > float(order['info']['stopPrice']):
if self.exchange.stoploss_adjust(trade.stop_loss, order):
# we check if the update is neccesary
update_beat = self.strategy.order_types.get('stoploss_on_exchange_interval', 60)
if (datetime.utcnow() - trade.stoploss_last_update).total_seconds() >= update_beat: