예제 #1
0
class QuotePublisher(object):
    """ Qoute publisher class """
    def __init__(self, *args, **kwargs):
        self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
        super(QuotePublisher, self).__init__(*args, **kwargs)

    def send(self, quote):
        json = simplejson.dumps(quote)
        self.socket.send(json)
예제 #2
0
class QuotePublisher(object):
    """ Qoute publisher class """

    def __init__(self, *args, **kwargs):
        self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
        super(QuotePublisher, self).__init__(*args, **kwargs)

    def send(self, quote):
        json = simplejson.dumps(quote)
        self.socket.send(json)
예제 #3
0
class BandAnalyzer(object):
    def __init__(self, *args, **kwargs):
        self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
        super(BandAnalyzer, self).__init__(*args, **kwargs)

    def process_quotes(self):

        data = self.socket.receive()

        if data:
            print data
예제 #4
0
파일: bands.py 프로젝트: derifo/FourierFx
class BandAnalyzer(object):

    def __init__(self, *args, **kwargs):
        self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
        super(BandAnalyzer, self).__init__(*args, **kwargs)

    def process_quotes(self):

        data = self.socket.receive()

        if data:
            print data
예제 #5
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
     super(QuotePublisher, self).__init__(*args, **kwargs)
예제 #6
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
     super(QuotePublisher, self).__init__(*args, **kwargs)
예제 #7
0
파일: bands.py 프로젝트: derifo/FourierFx
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
     super(BandAnalyzer, self).__init__(*args, **kwargs)
예제 #8
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
     super(BandAnalyzer, self).__init__(*args, **kwargs)