Ejemplo n.º 1
0
    def _get_cmc_coin_id(self, ticker):
        self.cmc_coin_id = None

        for listing in APICache.get_cmc_coin_list():
            if ticker.upper() == listing["symbol"].upper():
                self.cmc_coin_id = listing["id"]
                break
Ejemplo n.º 2
0
    def _from_coinmarketcap(self, coin):
        slug = str()

        for listing in APICache.get_cmc_coin_list():
            if coin.upper() == listing["symbol"].upper():
                self.name = listing["name"].capitalize()
                slug = listing["website_slug"]
                break

        if not slug:
            return None

        return webs.get_wp_coinmarketcap(slug)