예제 #1
0
파일: mux.py 프로젝트: smandy/pyfix
 def __init__(self, mux):
     FIXApplication.__init__(self, fix)
     self.mux = mux
     self.dispatchDict = {fix.OrderSingle: self.onOrder,
                          fix.Heartbeat: self.noop}
     self.recovery_dict = {fix.ExecutionReport: self.onRecoveredExecution,
                          fix.OrderSingle: self.onRecoveredOrder,
                          fix.ResendRequest: self.noop,
                          fix.Heartbeat: self.noop,
                          fix.Logon: self.noop}
     self.orders = 0
     self.execs = 0
예제 #2
0
파일: sender.py 프로젝트: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatch_dict = {
            fix.ExecutionReport: self.on_execution,
            fix.Heartbeat: beep
        }

        self.recovery_dict = {
            fix.ExecutionReport: self.recovered_execution,
            fix.Heartbeat: self.noop,
            fix.Logon: self.noop,
            fix.OrderSingle: self.on_recovered_new_order_single,
        }
예제 #3
0
파일: sender.py 프로젝트: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatch_dict = {
            fix.ExecutionReport: self.on_execution,
            fix.Heartbeat: beep
        }

        self.recovery_dict = {
            fix.ExecutionReport: self.recovered_execution,
            fix.Heartbeat: self.noop,
            fix.Logon: self.noop,
            fix.OrderSingle: self.on_recovered_new_order_single,
        }
예제 #4
0
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatchDict = {fix.Heartbeat: self.onHeartbeat}
        self.testRequests = {}
        self.latencies = defaultdict(lambda: DelayData())

        #frequncies = [ 1., 10, 30, 50, 75, 100, 110, 120, 130, 140, 150, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270 ]

        frequencies = range(10, 300, 5)
        self.delays = [1. / x for x in frequencies]

        #self.delays = [ 0.0005, 0.0001]

        self.delay = self.delays.pop(0)
        self.stopped = False
예제 #5
0
파일: sender.py 프로젝트: smandy/pyfix
    def __init__(self, fix):
        FIXApplication.__init__(self, fix)
        self.dispatchDict = { fix.Heartbeat : self.onHeartbeat }
        self.testRequests = {}
        self.latencies = defaultdict( lambda: DelayData() )

        #frequncies = [ 1., 10, 30, 50, 75, 100, 110, 120, 130, 140, 150, 150, 160, 170, 180, 190, 200, 210, 220, 230, 240, 250, 260, 270 ]

        frequencies = range( 10, 300, 5)
        self.delays = [ 1./x for x in frequencies]
        
        #self.delays = [ 0.0005, 0.0001]

        self.delay = self.delays.pop(0)
        self.stopped = False
예제 #6
0
    def __init__(self, session_manager, fix, config):
        self.session_manager = session_manager
        self.protocol = None
        self.fix = fix
        self.sender = config.sender
        self.target = config.target
        self.sender_compid = fix.SenderCompID(self.sender)
        self.target_compid = fix.TargetCompID(self.target)
        self.begin_string = fix.BeginString(fix.version)
        self.out_msg_seq_num = 1
        self.in_msg_seq_num = 1
        self.set_persister(
            BerkeleyPersister(config.persistRoot, self.sender, self.target))
        self.heartbeat_interval = config.heartbeatInterval
        # Why do we need an sp?
        self.sp = SynchronousParser(self.fix)
        self.last_by_type = {}
        self.state = None
        if config.app:
            self.set_app(config.app)
        else:
            self.set_app(FIXApplication(fix))

        self.on_integrity_exception = None
        self.last_integrity_exception = None
        self.want_to_be_logged_in = True
예제 #7
0
파일: sinks.py 프로젝트: smandy/pyfix
 def __init__(self):
     FIXApplication.__init__(self, fix)
     self.dispatch_dict = {fix.OrderSingle: self.on_order}
예제 #8
0
파일: receiver.py 프로젝트: smandy/pyfix
 def __init__(self, f):
     FIXApplication.__init__(self, f)
     self.dispatch_dict = {
         f.OrderSingle: self.on_order,
         f.Heartbeat: boop
     }
예제 #9
0
 def __init__(self, f):
     FIXApplication.__init__(self, f)
     self.dispatch_dict = {f.OrderSingle: self.on_order, f.Heartbeat: boop}
예제 #10
0
파일: sinks.py 프로젝트: smandy/pyfix
 def __init__(self):
     FIXApplication.__init__(self, fix)
     self.dispatch_dict = {fix.OrderSingle: self.on_order}
예제 #11
0
 def __init__(self, onHeartbeat, onStateChange):
     FIXApplication.__init__(self, fix)
     self.dispatchDict = { fix.Heartbeat : self.onHeartbeat }
     self.heartBeatDelegate = onHeartbeat
     self.stateDelegate = onStateChange
예제 #12
0
 def __init__(self, onHeartbeat, onStateChange):
     FIXApplication.__init__(self, fix)
     self.dispatchDict = {fix.Heartbeat: self.onHeartbeat}
     self.heartBeatDelegate = onHeartbeat
     self.stateDelegate = onStateChange