def fetch_history(stock, start, end):
"""
History data forward answer authority
"""
disable_stdout()
with timer(logtime("ts.get_h_data('%s', autype=None, start='%s', end='%s', drop_factor=False)" % (stock, start, end))):
df = await wait_concurrent(event_loop, proc_pool, ts.get_h_data, stock, autype=None, start=start, end=end, drop_factor=False, pause=0.05)
if df is None:
logging.debug("no history data for stock: ts.get_h_data('%s', autype=None, start='%s', end='%s')" % (stock, start, end))
return
df['stock'] = stock
ans = df.reset_index()
return history_buffer.proc_data(ans)
评论列表
文章目录