We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
quote和kline 里面都包含最新的价格, 如果只监控 最新价格的变化, 他们更新的频率是一样的吗?
有这个需求是,如果频率一样,我就只需要关注kline里面价格的最新变化,kline结构数据比quote少很多,可能新的数据就更少了, 可以大大节约网络传输。
但是不确定如果只关心最新价格,更新频率是否一样?
The text was updated successfully, but these errors were encountered:
刚才写了个小测试程序,好像是同时都更新了,每次都是同时都能监测到。
from tqsdk import *
api = TqApi(TqSim())
q = api.get_quote('CFFEX.IC1907') k = api.get_kline_serial('CFFEX.IC1907', 86400)
while True: api.wait_update()
if api.is_changing(k.iloc[-1], "close"): print("kline:", k.close.iloc[-1]) if api.is_changing(q, "last_price"): print("quote:", q["last_price"]) print('----------------------------------')
Sorry, something went wrong.
如果够用,那我只跟踪kline是没问题对吗? 最新价格我就用 k.close.iloc[-1],可行吗
quote和kline最后一根的close是同时更新的
No branches or pull requests
quote和kline 里面都包含最新的价格, 如果只监控 最新价格的变化, 他们更新的频率是一样的吗?
有这个需求是,如果频率一样,我就只需要关注kline里面价格的最新变化,kline结构数据比quote少很多,可能新的数据就更少了, 可以大大节约网络传输。
但是不确定如果只关心最新价格,更新频率是否一样?
The text was updated successfully, but these errors were encountered: