예제 #1
0
 def set_alt_usd_pair(self, type):
     """
     get center price by search and replace for USD with USDT only
     todo: extend in PriceFeed or base.py for other alts, e.g. USDC, TUSD,etc
     """
     alt_usd_pair = self._pair
     i = 0
     while i < 2:
         if re.match(r'^USD$', self._pair[i], re.I):
             alt_usd_pair[i] = re.sub(r'USD', type, self._pair[i])
         i = i + 1
     self._pair = alt_usd_pair
     self._symbol = join_pair(self._pair)
예제 #2
0
 def pair(self, pair):
     self._pair = pair
     self._symbol = join_pair(pair)