Beispiel #1
0
    def add_extension(self, extension: CtpbeeApi) -> None:
        """
        添加插件(策略)

        Args:
          extension(CtpbeeApi): 策略实例

        """
        self._extensions.pop(extension.extension_name, None)
        extension.init_app(self)
Beispiel #2
0
 def add_extension(self, extension: CtpbeeApi):
     """添加插件"""
     self.extensions.pop(extension.extension_name, None)
     extension.init_app(self)
     self.extensions[extension.extension_name] = extension
Beispiel #3
0
 def add_extension(self, extension: CtpbeeApi):
     """添加插件"""
     extension.init_app(self)
     self.extensions[extension.extension_name] = extension
Beispiel #4
0
 def add_extension(self, extension: CtpbeeApi):
     """添加插件"""
     if extension.extension_name in self.extensions:
         return
     extension.init_app(self)
     self.extensions[extension.extension_name] = extension