def add_extension(self, extension: CtpbeeApi) -> None: """ 添加插件(策略) Args: extension(CtpbeeApi): 策略实例 """ self._extensions.pop(extension.extension_name, None) extension.init_app(self)
def add_extension(self, extension: CtpbeeApi): """添加插件""" self.extensions.pop(extension.extension_name, None) extension.init_app(self) self.extensions[extension.extension_name] = extension
def add_extension(self, extension: CtpbeeApi): """添加插件""" extension.init_app(self) self.extensions[extension.extension_name] = extension
def add_extension(self, extension: CtpbeeApi): """添加插件""" if extension.extension_name in self.extensions: return extension.init_app(self) self.extensions[extension.extension_name] = extension