count = 260
# 需要计算年均线
xtdata.download_history_data2(stock_list=code_list, period=period,start_time=start_time, end_time=end_time, callback=download_stock_data_1d)
day_datas = xtdata.get_market_data_ex([], stock_list=code_list, period=period, end_time=end_time, count=count)
start_time 与 end_time之间差一年,如果股票中间停牌过,哪么下载的数据就不够一年, 看下图,下载的一段数据是空值。get_market_data_ex计算年线均值就不准了?
download_history_data2 接口里怎么没有count字段? 与get_market_data_ex 对应不起来呀?

|