Ejemplo n.º 1
0
def Main():
    bot_controller = defineBot(bot_config)
    while True:
        try:
            bot_controller.executeBot()
        except KeyboardInterrupt:
            return
        time.sleep(60)
Ejemplo n.º 2
0
def Main():
    # The following will run the strategy on the exchange
    bot_controller = defineBot(bot_config)
    while True:
        try:
            bot_controller.executeBot()
        except KeyboardInterrupt:
            return
        time.sleep(60)
def Main():
    bot_controller = defineBot(bot_config)
    while True:
        print(time.ctime())
        try:
            bot_controller.executeBot()
            time.sleep(30)

        except KeyboardInterrupt:
            return
Ejemplo n.º 4
0
def Main():
    if os.path.isfile('./AdvancedBotTemplate.db'):
        os.remove('./AdvancedBotTemplate.db')

    symbols = ['DASH/ETH']
    bot_config['symbols'] = symbols

    bot_controller = defineBot(bot_config)
    bot_controller.kline_interval = '1m'   
    while True:
        try:
            bot_controller.executeBot()
        except KeyboardInterrupt:
            return
        except Exception as e:
            exc_type, exc_obj, exc_tb = sys.exc_info()
            fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
            print(str(e))

            # if we had an exception then the database will probably be corrupt --> start a new one
            if os.path.isfile('./AdvancedBotTemplate.db'):
                os.remove('./AdvancedBotTemplate.db')
        
        time.sleep(1)