remove unnecessary else statements
This commit is contained in:
parent
1eebbebed1
commit
67995a2f49
@ -64,7 +64,7 @@ def process_maybe_execute_buy(interval):
|
|||||||
# Create entity and execute trade
|
# Create entity and execute trade
|
||||||
if create_trade(float(_CONF['stake_amount']), interval):
|
if create_trade(float(_CONF['stake_amount']), interval):
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
logger.info(
|
logger.info(
|
||||||
'Checked all whitelisted currencies. '
|
'Checked all whitelisted currencies. '
|
||||||
'Found no suitable entry positions for buying. Will keep looking ...'
|
'Found no suitable entry positions for buying. Will keep looking ...'
|
||||||
@ -159,7 +159,7 @@ def handle_timedout_limit_buy(trade: Trade, order: Dict) -> bool:
|
|||||||
rpc.send_msg('*Timeout:* Unfilled buy order for {} cancelled'.format(
|
rpc.send_msg('*Timeout:* Unfilled buy order for {} cancelled'.format(
|
||||||
trade.pair.replace('_', '/')))
|
trade.pair.replace('_', '/')))
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
# if trade is partially complete, edit the stake details for the trade
|
# if trade is partially complete, edit the stake details for the trade
|
||||||
# and close the order
|
# and close the order
|
||||||
trade.amount = order['amount'] - order['remaining']
|
trade.amount = order['amount'] - order['remaining']
|
||||||
@ -189,7 +189,7 @@ def handle_timedout_limit_sell(trade: Trade, order: Dict) -> bool:
|
|||||||
trade.pair.replace('_', '/')))
|
trade.pair.replace('_', '/')))
|
||||||
logger.info('Sell order timeout for %s.', trade)
|
logger.info('Sell order timeout for %s.', trade)
|
||||||
return True
|
return True
|
||||||
else:
|
|
||||||
# TODO: figure out how to handle partially complete sell orders
|
# TODO: figure out how to handle partially complete sell orders
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user