mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Improve remove credentials
This commit is contained in:
parent
6541782758
commit
b2a3fe6879
|
@ -4,6 +4,7 @@ import time
|
|||
from functools import wraps
|
||||
from typing import Any, Callable, Optional, TypeVar, cast, overload
|
||||
|
||||
from freqtrade.constants import Config
|
||||
from freqtrade.exceptions import DDosProtection, RetryableOrderError, TemporaryError
|
||||
from freqtrade.mixins import LoggingMixin
|
||||
|
||||
|
@ -87,7 +88,7 @@ EXCHANGE_HAS_OPTIONAL = [
|
|||
]
|
||||
|
||||
|
||||
def remove_credentials(config) -> None:
|
||||
def remove_credentials(config: Config) -> None:
|
||||
"""
|
||||
Removes exchange keys from the configuration and specifies dry-run
|
||||
Used for backtesting / hyperopt / edge and utils.
|
||||
|
@ -95,6 +96,7 @@ def remove_credentials(config) -> None:
|
|||
"""
|
||||
if config.get('dry_run', False):
|
||||
config['exchange']['key'] = ''
|
||||
config['exchange']['apiKey'] = ''
|
||||
config['exchange']['secret'] = ''
|
||||
config['exchange']['password'] = ''
|
||||
config['exchange']['uid'] = ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user