improve check when not to run

This commit is contained in:
Matthias Voppichler 2018-04-23 20:06:00 +02:00
parent f580fbb91d
commit d2608cbf13

View File

@ -365,10 +365,10 @@ class FreqtradeBot(object):
# Update trade with order values
logger.info('Found open order for %s', trade)
order = exchange.get_order(trade.open_order_id, trade.pair)
# TODO: correct place here ??
# Try update amount (binance-fix)
try:
if trade.fee_open != 0:
# Only run for closed trades
if trade.fee_open != 0 and not (order['status'] == 'open' or order['price'] is None):
new_amount = self.get_real_amount(trade)
# This may break if a exchange applies no fee (which appears highly unlikely)
if order['amount'] != new_amount: