TBPY中write_fundamental函數寫入數據為空
作者:開拓者 TB 來源:cxh99.com 發布時間:2022年01月27日
-
咨詢內容:
在Python中調用tbpy的write_fundamental函數寫入基礎數據后,在軟件中有顯示這個數據名,但是進行查詢時沒有數據,請問是什么原因?
測試樣例:
寫入rb000的收盤價,名為“wave2”,具體python代碼:- import tbpy
- tbpy.init()
- begintime=datetime.strptime('20000101','%Y%m%d')
- endtime=datetime.strptime('20200110','%Y%m%d')
- bars=tbpy.get_history('rb000.SHFE', '1d', begintime,? ? endtime, fields=None, timeout='30s')
- for i in range(len(bars['time'])):
- ? ? tbpy.write_fundamental(name='wave2', symbol='rb000.SHFE', time=bars['time'][i], value=float(bars['close'][i]))
?
?來源:CXH99.COM
-
TB技術人員:
TBQuant軟件更新114版本之后問題解決了。