optimize to only do network calls if necessary
This commit is contained in:
parent
a70958da41
commit
93a7c46977
@ -368,9 +368,10 @@ class FreqtradeBot(object):
|
|||||||
# TODO: correct place here ??
|
# TODO: correct place here ??
|
||||||
# Try update amount (binance-fix)
|
# Try update amount (binance-fix)
|
||||||
try:
|
try:
|
||||||
|
if trade.fee_open != 0:
|
||||||
new_amount = self.get_real_amount(trade)
|
new_amount = self.get_real_amount(trade)
|
||||||
# This may break if a exchange applies no fee (which appears highly unlikely)
|
# This may break if a exchange applies no fee (which appears highly unlikely)
|
||||||
if order['amount'] != new_amount and trade.fee_open != 0:
|
if order['amount'] != new_amount:
|
||||||
logger.info("Updating amount for Trade {} from {} to {}".format(
|
logger.info("Updating amount for Trade {} from {} to {}".format(
|
||||||
trade, order['amount'], new_amount))
|
trade, order['amount'], new_amount))
|
||||||
order['amount'] = new_amount
|
order['amount'] = new_amount
|
||||||
|
Loading…
Reference in New Issue
Block a user