def downloadEMDayWeekData(stockCode): '''从东方财富下载日/周数据,直接插入数据库中 由于是第一次使用,所以下载全部数据,直接插入 ''' data = downloadKLineDataEM(stockCode, 'daily') print('%s daily data downloaded' % stockCode) updateKLineData(stockCode, data, 'daily') data = downloadKLineDataEM(stockCode, 'weekly') print('%s weekly data downloaded' % stockCode) updateKLineData(stockCode, data, 'weekly')
def updateWeeklyData(stockCode): data = downloadKLineDataEM(stockCode, 'weekly') storeKlineData(stockCode, 'weekly', data)
def updateMinutesData(stockCode): minutesList = ['min5', 'min15', 'min30', 'min60'] for i in minutesList: data = downloadKLineDataEM(stockCode, i) storeKlineData(stockCode, i, data)
def updateDailyData(stockCode): data = downloadKLineDataEM(stockCode, 'daily') storeKlineData(stockCode, 'daily', data)
def updateTodayMin1Data(stockCode): data = downloadKLineDataEM(stockCode, 'min1') storeKlineData(stockCode, 'min1', data)