from xtquant import xtdata def on_data (datas):#回调函数 print(datas)
seq = xtdata.subscribe_whole_quote(code_list=[‘002306.SZ’], callback=on_data)
time.sleep(10)
xtdata.unsubscribe_quote(seq)
print(‘取消订阅成功’)