nooperpudd / ctpwrapper

上海期货交易所CTP接口 Shanghai Future CTP Interface CTP Python API Wrapper
Other
463 stars 157 forks source link

user_trader.ReqQryInstrument("",0) get error #41

Open softbug123 opened 5 years ago

softbug123 commented 5 years ago

File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\lib\site-packages\ctpwrapper\Trader.py", line 279, in ReqQryInstrument return super(TraderApiPy, self).ReqQryInstrument(pQryInstrument, nRequestID) File "ctpwrapper\TraderApi.pyx", line 502, in ctpwrapper.TraderApi.TraderApiWrapper.ReqQryInstrument TypeError: invalid type

how to solve it?

softbug123 commented 5 years ago

另外订购数据以后,没数据被回调。 a = md.SubscribeMarketData(["IF1912"]) 请问怎么回事呢

qytz commented 3 years ago

好像 README 里有一节说明:

sometimes quote the market futures data, but there is no trading data from the API stream, better just add time.sleep(2) func call after Init() method invoked, this could help to solve no data response issue.