从盈透证券获取实时数据

时间:2018-11-18 10:03:41

标签: python

当我导入from temp import get_IB_historical_data时,python会显示一条错误消息cannot import name 'get_IB_historical_data'

我已在线搜索,但找不到解决方案。你们能请我建议我如何解决它吗?

临时py代码可以在下面找到: https://gist.github.com/robcarver17/f50aeebc2ecd084f818706d9f05c1eb4

我的代码如下:

from DataDownload import get_IB_historical_data
contractHHI = contract()
contractHHI.symbol = "HHI.HK"
contractHHI.secType = "FUT"
contractHHI.exchange = "HKFE"
contractHHI.currency = "HKD"
contractHHI.lastTradeDateOrContractMonth = "201811"
raw_df = get_IB_historical_data(ibcontract = contractHHI, durationStr="1 D", barSizeSetting="1 min", tickerid=DEFAULT_HISTORIC_DATA_ID)

在此先感谢您为您提供的帮助!

0 个答案:

没有答案