Update based on flake8
This commit is contained in:
parent
f30580e5f2
commit
748381c5cd
@ -478,9 +478,9 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
count_of_buys = len(filled_buys)
|
count_of_buys = len(filled_buys)
|
||||||
if count_of_buys > self.strategy.max_buy_position_adjustment:
|
if count_of_buys > self.strategy.max_buy_position_adjustment:
|
||||||
logger.debug(f"Max adjustment buy for {trade.pair} has been reached.")
|
logger.debug(f"Max adjustment buy for {trade.pair} has been reached.")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
logger.debug(f"Max adjustment buy is set to unlimited.")
|
logger.debug("Max adjustment buy is set to unlimited.")
|
||||||
current_rate = self.exchange.get_rate(trade.pair, refresh=True, side="buy")
|
current_rate = self.exchange.get_rate(trade.pair, refresh=True, side="buy")
|
||||||
current_profit = trade.calc_profit_ratio(current_rate)
|
current_profit = trade.calc_profit_ratio(current_rate)
|
||||||
|
|
||||||
|
@ -173,6 +173,8 @@ class ShowConfig(BaseModel):
|
|||||||
bot_name: str
|
bot_name: str
|
||||||
state: str
|
state: str
|
||||||
runmode: str
|
runmode: str
|
||||||
|
position_adjustment_enable: bool
|
||||||
|
max_buy_position_adjustment: int
|
||||||
|
|
||||||
|
|
||||||
class TradeSchema(BaseModel):
|
class TradeSchema(BaseModel):
|
||||||
|
@ -139,7 +139,8 @@ class RPC:
|
|||||||
'runmode': config['runmode'].value,
|
'runmode': config['runmode'].value,
|
||||||
'position_adjustment_enable': config.get('position_adjustment_enable', False),
|
'position_adjustment_enable': config.get('position_adjustment_enable', False),
|
||||||
'max_buy_position_adjustment': (config['max_buy_position_adjustment']
|
'max_buy_position_adjustment': (config['max_buy_position_adjustment']
|
||||||
if config['max_buy_position_adjustment'] != float('inf') else -1)
|
if config['max_buy_position_adjustment'] != float('inf')
|
||||||
|
else -1)
|
||||||
}
|
}
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
@ -1353,7 +1353,7 @@ class Telegram(RPCHandler):
|
|||||||
f"*Max buy position adjustment:* `{val['max_buy_position_adjustment']}`\n"
|
f"*Max buy position adjustment:* `{val['max_buy_position_adjustment']}`\n"
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
pa_info = f"*Position adjustment:* Off\n"
|
pa_info = "*Position adjustment:* Off\n"
|
||||||
|
|
||||||
self._send_msg(
|
self._send_msg(
|
||||||
f"*Mode:* `{'Dry-run' if val['dry_run'] else 'Live'}`\n"
|
f"*Mode:* `{'Dry-run' if val['dry_run'] else 'Live'}`\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user