Exemplo n.º 1
0
def load_cryptowat_short():
    i = 0
    while i < 1000:
        time.sleep(1)
        get_ohlc(300, 1)
        i += 1
        print(i)
Exemplo n.º 2
0
def load_cryptowat_lostcheck():
    i = 0
    s = ""
    t = 0
    while True:
        res, allo = get_ohlc(300, 1)
        # res = "1"
        t += 1 if len(res) == 1 else 0
        i += 1
        os.system('clear')
        if i % 10 == 0:
            s += "A" if t == 10 else str(t)
            t = 0
            if i % 200 == 0:
                s += "\n"
        print(s + str(t))
        rema = allo["remaining"]
        print(f"{rema}/4000000000")
        time.sleep(10)
Exemplo n.º 3
0
 def sell_judge(self, margin=0):
     if tconf.cycle_debug: return True
     data, _ = get_ohlc(self.size_candle, self.size, self.market, self.pair)
     return sell_judge_snake(data, self.size, margin=margin, entry_min=self.minsize)[0]
Exemplo n.º 4
0
    def sell_judge(self, size=tconf.cbs_size, margin=0):
        if tconf.cycle_debug: return True
        data, _ = get_ohlc(tconf.size_candle, size)

        return sell_judge_channelbreakout(data, margin)
Exemplo n.º 5
0
def get_price_data():
    return get_ohlc(period, 1000)
Exemplo n.º 6
0
def get_recent_data():
    print(market, pair)
    data, _ = get_ohlc(candle, 100000, market, pair)
    return data
Exemplo n.º 7
0
def load_cryptowat():
    for _ in range(10):
        time.sleep(0.5)
        res, _ = get_ohlc(300, 1)
        print(res)
        print(len(res))
Exemplo n.º 8
0
def get_price_data():
    data, _ = get_ohlc(tconf.size_candle, 1000)
    return data