def get_stick_hisdata_m(self,begin_date,end_date):
# cur.execute("select code,outstanding from t_all_stickcode where outstanding < 50000 and (substr(code,1,1)='0' or substr(code,1,1)='6'); ;")
self.cur.execute("select code,outstanding from t_all_stickcode a where not EXISTS (select * from t_stick_data_d where code = a.code);")
sqlrs = self.cur.fetchall();
# self.cur.execute("delete from t_stick_data_m")
self.sqlconn.commit()
for code in sqlrs:
print(code[0] )
rs = ts.get_k_data(code=code[0],start=begin_date,end=end_date,ktype='M')
self.db.delete_date('t_stick_data_m',end_date,code[0])
self.db.insert_data('t_stick_data_m',rs.as_matrix())
self.sqlconn.commit()
return
评论列表
文章目录