版本1.8.3,一直重连,错误信息如下:
2020-08-07 16:14:10,862 – INFO – 通知: 与 ws://nfmd.shinnytech.com/t/nfmd/front/mobile 的网络连接已建立
2020-08-07 16:14:10,865 – WARNING – 通知: 与 ws://nfmd.shinnytech.com/t/nfmd/front/mobile 的网络连接断开,请检查客户端及网络是否正常
2020-08-07 16:14:20,917 – WARNING – 通知: 与 ws://nfmd.shinnytech.com/t/nfmd/front/mobile 的网络连接已恢复
2020-08-07 16:14:20,919 – WARNING – 通知: 与 ws://nfmd.shinnytech.com/t/nfmd/front/mobile 的网络连接断开,请检查客户端及网络是否正常
用的是官方的例子代码,代码如下:
from tqsdk import TqApi # 传入_stock = True 切换到测试行情服务器 api = TqApi(_stock= True) # 订阅上交所股票数据 quote = api.get_quote("SSE.600000") print(quote.last_price) api.close()
看错误信息有点像连接问题,每次刚连上服务器就自动断掉