mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Remove keys from config before loading strategy
This commit is contained in:
parent
b2a631e93a
commit
66c3eb2820
|
@ -23,6 +23,7 @@ from freqtrade.exceptions import (DependencyException, ExchangeError, Insufficie
|
||||||
InvalidOrderException, PricingError)
|
InvalidOrderException, PricingError)
|
||||||
from freqtrade.exchange import (ROUND_DOWN, ROUND_UP, timeframe_to_minutes, timeframe_to_next_date,
|
from freqtrade.exchange import (ROUND_DOWN, ROUND_UP, timeframe_to_minutes, timeframe_to_next_date,
|
||||||
timeframe_to_seconds)
|
timeframe_to_seconds)
|
||||||
|
from freqtrade.exchange.common import remove_exchange_credentials
|
||||||
from freqtrade.misc import safe_value_fallback, safe_value_fallback2
|
from freqtrade.misc import safe_value_fallback, safe_value_fallback2
|
||||||
from freqtrade.mixins import LoggingMixin
|
from freqtrade.mixins import LoggingMixin
|
||||||
from freqtrade.persistence import Order, PairLocks, Trade, init_db
|
from freqtrade.persistence import Order, PairLocks, Trade, init_db
|
||||||
|
@ -64,6 +65,8 @@ class FreqtradeBot(LoggingMixin):
|
||||||
# Init objects
|
# Init objects
|
||||||
self.config = config
|
self.config = config
|
||||||
exchange_config = deepcopy(config['exchange'])
|
exchange_config = deepcopy(config['exchange'])
|
||||||
|
# Remove credentials from original exchange config to avoid accidental credentail exposure
|
||||||
|
remove_exchange_credentials(config['exchange'], True)
|
||||||
|
|
||||||
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
self.strategy: IStrategy = StrategyResolver.load_strategy(self.config)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user