Implement first stop method

This commit is contained in:
Matthias
2020-10-14 07:40:44 +02:00
parent a0bd2ce837
commit 3447f1ae53
6 changed files with 112 additions and 13 deletions

View File

@@ -24,21 +24,16 @@ class ProtectionResolver(IResolver):
initial_search_path = Path(__file__).parent.parent.joinpath('plugins/protections').resolve()
@staticmethod
def load_protection(protection_name: str, exchange, protectionmanager,
config: Dict, protection_config: Dict) -> IProtection:
def load_protection(protection_name: str, config: Dict, protection_config: Dict) -> IProtection:
"""
Load the protection with protection_name
:param protection_name: Classname of the pairlist
:param exchange: Initialized exchange class
:param protectionmanager: Initialized protection manager
:param config: configuration dictionary
:param protection_config: Configuration dedicated to this pairlist
:return: initialized Protection class
"""
return ProtectionResolver.load_object(protection_name, config,
kwargs={'exchange': exchange,
'pairlistmanager': protectionmanager,
'config': config,
'pairlistconfig': protection_config,
kwargs={'config': config,
'protection_config': protection_config,
},
)