Ejemplo n.º 1
0
    async def _post_initialize(self):
        self.initialized = True

        # make tentacles setup config editable while saving previous states
        self.configuration_manager.add_element(constants.TENTACLES_SETUP_CONFIG_KEY, self.tentacles_setup_config)
        await service_api.send_notification(
            service_api.create_notification(f"{constants.PROJECT_NAME} {constants.LONG_VERSION} is starting ...",
                                            markdown_format=enums.MarkdownFormat.ITALIC))
Ejemplo n.º 2
0
 async def _send_alert_notification(self, symbol):
     try:
         import octobot_services.api as services_api
         import octobot_services.enums as services_enum
         title = f"DCA trigger for : #{symbol}"
         alert = "BUYING event"
         await services_api.send_notification(services_api.create_notification(alert, title=title,
                                                                               markdown_text=alert,
                                                                               category=services_enum.NotificationCategory.PRICE_ALERTS))
     except ImportError as e:
         self.logger.exception(e, True, f"Impossible to send notification: {e}")
Ejemplo n.º 3
0
 async def _send_alert_notification(self, symbol, new_state):
     try:
         import octobot_services.api as services_api
         import octobot_services.enums as services_enum
         title = f"OCTOBOT ALERT : #{symbol}"
         alert_content, alert_content_markdown = pretty_printer.cryptocurrency_alert(
             new_state,
             self.final_eval)
         await services_api.send_notification(services_api.create_notification(alert_content, title=title,
                                                                               markdown_text=alert_content_markdown,
                                                                               category=services_enum.NotificationCategory.PRICE_ALERTS))
     except ImportError as e:
         self.logger.exception(e, True, f"Impossible to send notification: {e}")