QuantityTradeTools.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:RobotTrader 作者: JaySinco 项目源码 文件源码
def getStkListNowQuotes(self, stockList):
        ''' ???????? '''
        atOneTime = 30  # ????????????
        nowDict = {}
        while len(stockList) > atOneTime:
            thisTime = stockList[:atOneTime]
            stockList = stockList[atOneTime:]
            data = ts.get_realtime_quotes(thisTime)
            nowPrice = data['price'].values
            nowVolume = data['volume'].values
            for index,code in enumerate(thisTime):
                nowDict[code] = {'price':eval(nowPrice[index]), 'vol':eval(nowVolume[index])}
        # ?????
        if len(stockList)>0:
            data = ts.get_realtime_quotes(stockList)
            nowPrice = data['price'].values
            nowVolume = data['volume'].values
            for index,code in enumerate(stockList):
                nowDict[code] = {'price':eval(nowPrice[index]), 'vol':eval(nowVolume[index])}
        return nowDict
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号