示例#1
0
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')
示例#2
0
def updateWeeklyData(stockCode):
    data = downloadKLineDataEM(stockCode, 'weekly')
    storeKlineData(stockCode, 'weekly', data)
示例#3
0
def updateMinutesData(stockCode):
    minutesList = ['min5', 'min15', 'min30', 'min60']
    for i in minutesList:
        data = downloadKLineDataEM(stockCode, i)
        storeKlineData(stockCode, i, data)
示例#4
0
def updateDailyData(stockCode):
    data = downloadKLineDataEM(stockCode, 'daily')
    storeKlineData(stockCode, 'daily', data)
示例#5
0
def updateTodayMin1Data(stockCode):
    data = downloadKLineDataEM(stockCode, 'min1')
    storeKlineData(stockCode, 'min1', data)