Example #1
0
    def _test_fenshi_redis(self):
        """取一个个股的redis, 看下日期"""
        end_day = agl.CurDay()
        start_day = help.MyDate.s_Dec(end_day, -15)
        code = u'600100'

        #取一个值
        df_fenshi = getFiveMinFenshiFromRedis(code)
        df_fenshi_day = df_fenshi.resample('D').dropna()
        self.assertEqual(len(df_fenshi_day), 5)
        d = agl.datetime_to_date(df_fenshi_day.index[-1])
        self.assertEqual(stock.getKlineLastDay(), d)

        df = stock.LiveData().getFiveMinHisdat(code)
        print(df)
Example #2
0
 def get_fiveminhisdat(self, code):
     return stock.LiveData().getFiveMinHisdat(code)