Beispiel #1
0
 def __init__(self, data={}):
     self.period = 120
     self.exchanges = Exchanges()
     self.yahoo = Yahoo()
     self.sina = Sina()
     self.handler = None
     data_type = ["orderbook", "ticker", "rate"]
     for _type in data_type:
         if _type not in data:
             data[_type] = {}
     self.data = data
Beispiel #2
0
 def __init__(self, data={}, magicwalletkey = ''):
     self.period = 120
     self.exchanges = Exchanges()
     self.yahoo = Yahoo()
     self.sina = Sina()
     self.magicwallet = Magicwallet(magicwalletkey)
     self.handler = None
     data_type = ["orderbook", "ticker", "rate", "magic"]
     for _type in data_type:
         if _type not in data:
             data[_type] = {}
     self.data = data
Beispiel #3
0
 def __init__(self, data={}, config=None):
     self.period = 120
     self.exchanges = Exchanges(config)
     self.yahoo = Yahoo()
     self.sina = Sina()
     self.c2c = C2C()
     self.config = config
     self.handler = None
     data_type = ["orderbook", "ticker", "rate", "magic", "okexc2c"]
     for _type in data_type:
         if _type not in data:
             data[_type] = {}
     self.data = data