def command_pause_resume(self, _, update): if self.paused: update.message.reply_text( "Resuming...{0}I will restart trading when i see opportunities !" .format(TelegramApp.EOL)) set_enable_trading(True) self.paused = False else: update.message.reply_text( "Pausing...{}I'm cancelling my orders.".format( TelegramApp.EOL)) cancel_all_open_orders() set_enable_trading(False) self.paused = True
def set_command_resume(self): set_enable_trading(True) self.paused = False
def set_command_pause(self): cancel_all_open_orders() set_enable_trading(False) self.paused = True