Esempio n. 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)
Esempio n. 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)
Esempio n. 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
Esempio n. 4
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
Esempio n. 5
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
     super(QuotePublisher, self).__init__(*args, **kwargs)
Esempio n. 6
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XPUB')
     super(QuotePublisher, self).__init__(*args, **kwargs)
Esempio n. 7
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
     super(BandAnalyzer, self).__init__(*args, **kwargs)
Esempio n. 8
0
 def __init__(self, *args, **kwargs):
     self.socket = ZmqSocket(settings.QUOTES_BIND_ADDRESS, 'XSUB')
     super(BandAnalyzer, self).__init__(*args, **kwargs)