7.31K 浏览
0
print("启动...",__version__)
api = TqApi(TqAccount("快期模拟", "xxxx", "xxxx"))
k=api.get_kline_serial(symbols[i], 60)
r= symbol + "#" + k.iloc[-1]["id"].astype(str) + "#" + str(
    datetime.datetime.fromtimestamp(k.iloc[-1]["datetime"] / 1e9)) + "#" + k.iloc[-1][
         "open"].astype(str) + "#" + k.iloc[-1]["high"].astype(str) + "#" + k.iloc[-1][
         "low"].astype(str) + "#" + k.iloc[-1]["close"].astype(str) + "#" + k.iloc[-1][
         "volume"].astype(str) + "#" + k.iloc[-1]["open_oi"].astype(str) + "#" + k.iloc[-1][
         "close_oi"].astype(str)
print(r)

启动… 1.2.1

CFFEX.IF1912#36865.0#2019-12-05 13:25:00#3867.2#3867.2#3867.2#3867.2#0.0#77476.0#77476.0

以上是打印结果

版本:1.2.1, 为什么实时K线数据中 open,high,low,close 的数据是完全一样的. 我换了simnow账户还是一样

要怎么解决? 谢谢

west 已回答的问题 2019年12月5日
0

当最新的一根K线生成时,它的初始数据均为上跟k线的close(收盘价)

Greg Liu 发表新评论 2019年12月5日

谢谢, 那是否有办法解决这个问题?

您正在查看2个答案中的1个,单击此处查看所有答案。