本文整理匯總了Python中Session.Session.tickerSocket方法的典型用法代碼示例。如果您正苦於以下問題:Python Session.tickerSocket方法的具體用法?Python Session.tickerSocket怎麽用?Python Session.tickerSocket使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Session.Session
的用法示例。
在下文中一共展示了Session.tickerSocket方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Session
# 需要導入模塊: from Session import Session [as 別名]
# 或者: from Session.Session import tickerSocket [as 別名]
# #-- truncated for speeding up developement
# instList =instList[0:150];
# #-- end truncation
# index,credentials,fr,to
s = Session(users[lgIdx]['user'],users[lgIdx]['pwd'])
s.login()
socketMktSum = s.marketSummarySocket();
mktsumThread = threading.Thread(target=marketSumParser,args=(socketMktSum,))
mktsumThread.start()
lgIdx+=1
s = Session(users[lgIdx]['user'],users[lgIdx]['pwd'])
s.login()
socketTicker = s.tickerSocket();
tickerThread = threading.Thread(target=tickerParser,args=(socketTicker,))
tickerThread.start()
lgIdx+=1
# ---bypass for speeding up development
# np.save('tmpInstList.txt', instList)
# instList=np.load('tmpInstList.txt.npy')
# print len(instList)
# ---end bypass
#-- CrowdLogin
# s = Session(users[lgIdx]['user'],users[lgIdx]['pwd'])
# totalSocket = [];
# config.validateSocket= dict();
# config.validateInstrument= dict();