Exemplo n.º 1
0
 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
Exemplo n.º 2
0
 def set_command_resume(self):
     set_enable_trading(True)
     self.paused = False
Exemplo n.º 3
0
 def set_command_pause(self):
     cancel_all_open_orders()
     set_enable_trading(False)
     self.paused = True