示例#1
0
 def onMessage(self, responseMsg):
     GatewaySession.onMessage(self, responseMsg)
     if responseMsg.ID == isefix.LogonResp.ID:
         self._setThrottlingRate(responseMsg)
         self.loggedIn = True
     
     if responseMsg.ID == isefix.Reject.ID and responseMsg.ResponseHeader.MsgSeqNum == 1:
         self.logonRejected = True
         self.logonRejectedReason = responseMsg.Text
示例#2
0
    def onMessage(self, responseMsg):
        GatewaySession.onMessage(self, responseMsg)
        if responseMsg.ID == isefix.LogonResp.ID:
            self._setThrottlingRate(responseMsg)
            self.loggedIn = True

        if responseMsg.ID == isefix.Reject.ID and responseMsg.ResponseHeader.MsgSeqNum == 1:
            self.logonRejected = True
            self.logonRejectedReason = responseMsg.Text
示例#3
0
    def login(self):
        GatewaySession.login(self)
        st_time = time.time()
        timedOut = False
        while not self.loggedIn and not self.logonRejected and not timedOut:
            time.sleep(0.1)
            timedOut = (time.time() - st_time) > self.LOGIN_TIMEOUT_SECS

        if timedOut:
            self.logonRejected = True
            self.logonRejectedReason = "No response received in %s" % self.LOGIN_TIMEOUT_SECS
示例#4
0
    def login(self):
        GatewaySession.login(self)
        st_time = time.time()
        timedOut = False
        while not self.loggedIn and not self.logonRejected and not timedOut:
            time.sleep(0.1)
            timedOut = (time.time() - st_time) > self.LOGIN_TIMEOUT_SECS

        if timedOut:
            self.logonRejected = True
            self.logonRejectedReason = "No response received in %s" % self.LOGIN_TIMEOUT_SECS
示例#5
0
 def __init__(self, config, msgFile=None):
     GatewaySession.__init__(self, config, msgFile=msgFile)
     self.loggedIn = False
     self.logonRejected = False
     self.logonRejectedReason = ""
     self.rate = None 
示例#6
0
 def __init__(self, config, msgFile=None):
     GatewaySession.__init__(self, config, msgFile=msgFile)
     self.loggedIn = False
     self.logonRejected = False
     self.logonRejectedReason = ""
     self.rate = None