141 views
0

get_kline_serial

获取的股票k线数据返回的时间与国内不是一个时区,正好差8个小时,希望修复一下

Posted new comment

请问这个问题怎么解决?

0

具体有代码吗,我这边取得K线返回的时间没啥问题啊~

Posted new comment

from tqsdk import TqApi
import pandas as pd

api = TqApi(_stock=True)
klines = api.get_kline_serial(“SSE.600000”, 300)

with closing(api):
close = klines.close
close.index = pd.DatetimeIndex(klines.datetime)
print(“最后一根K线收盘价”, close.tail(10))

You are viewing 1 out of 1 answers, click here to view all answers.