cryptomon.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:cryptomon 作者: Mim0oo 项目源码 文件源码
def loopeth():
    global clock
    global old_price
    global etheur_sell_price

  # Current local time getter
    clock = datetime.now().strftime('[%Y-%m-%d %H:%M]')

  # Print LOOP ETH price
    etheur_sell_price = get_etheur_sell_price()
    etheur_buy_price = get_etheur_buy_price()

    """ print colors
    Fore.GREEN
    Fore.RED
    Fore.CYAN """

    if old_price < etheur_sell_price:
        logthis(clock+color_green(" ETH sell price raised: "
                + str(etheur_sell_price)+" EUR, ")
                + color_cyan('Balance: ')
                + str(get_etheur_balance(etheur_sell_price))+color_cyan(' EUR')
                + color_cyan(', BUY: ')
                + str(get_etheur_buy_price())+color_cyan(' EUR'))
    elif old_price > etheur_sell_price:
        logthis(clock+color_red(" ETH sell price dropped: "
                + str(etheur_sell_price)+" EUR, ")
                + color_cyan('Balance: ')
                + str(get_etheur_balance(etheur_sell_price))
                + color_cyan(' EUR')
                + color_cyan(', BUY: ')
                + str(get_etheur_buy_price())+color_cyan(' EUR'))

  #else:
    # Optional tick for the current price
    #print clock+color_cyan(" ETH sell price: ")+str(etheur_sell_price),
    color_cyan("EUR, ")+str(etheur_sell_price * CURR_EUR) \
        + color_cyan(" "+CURRENCY)
    eth_monitor()
    old_price = etheur_sell_price
    threading.Timer(60, loopeth).start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号