Example #1
0
            holders = api._get_asset_holders_count(asset_id)
            # print holders
        except:
            holders = 0
            continue

        if symbol == core_symbol:
            type_ = "Core Token"
        elif all_assets[x]["result"][i]["issuer"] == "1.2.0":
            type_ = "SmartCoin"
        else:
            type_ = "User Issued"
        #print all_assets[x]["result"][i]

        try:
            data = api._get_volume(core_symbol, symbol)
        except:
            continue

        #print symbol
        #print data["quote_volume"]

        try:
            data2 = api._get_ticker(core_symbol, symbol)
            price = data2["latest"]
            #print price

            if str(price) == 'inf':
               continue
            #    exit
        ws.send('{"id":1, "method":"call", "params":[0,"list_assets",["' +
                j["result"][99]["symbol"] + '", 100]]}')
        result = ws.recv()
        j = json.loads(result)
        len_result = len(j["result"])
        all_assets.append(j)

    try:
        for x in range(0, len(all_assets)):
            for i in range(0, 100):

                symbol = all_assets[x]["result"][i]["symbol"]
                id_ = all_assets[x]["result"][i]["id"]

                try:
                    data = api._get_volume(symbol, row[1])
                    volume = data["base_volume"]
                except:
                    volume = 0
                    continue

                try:
                    data2 = api._get_ticker(symbol, row[1])
                    price = data2["latest"]
                    #print price
                except:
                    price = 0
                    continue

                print row[1] + " / " + symbol + " vol: " + str(
                    volume) + " price: " + str(price)
Example #3
0
            holders = api._get_asset_holders_count(asset_id)
            # print holders
        except:
            holders = 0
            continue

        if symbol == config.CORE_ASSET_SYMBOL:
            type_ = "Core Token"
        elif all_assets[x]["result"][i]["issuer"] == "1.2.0":
            type_ = "SmartCoin"
        else:
            type_ = "User Issued"
        #print all_assets[x]["result"][i]

        try:
            data = api._get_volume(config.CORE_ASSET_SYMBOL, symbol)
        except:
            continue

        #print symbol
        #print data["quote_volume"]

        try:
            data2 = api._get_ticker(config.CORE_ASSET_SYMBOL, symbol)
            price = data2["latest"]
            #print price

            if str(price) == 'inf':
               continue
            #    exit