TBPY中write_fundamental函數(shù)寫入數(shù)據(jù)為空
作者:開拓者 TB 來源:cxh99.com 發(fā)布時(shí)間:2022年01月27日
-
咨詢內(nèi)容:
在Python中調(diào)用tbpy的write_fundamental函數(shù)寫入基礎(chǔ)數(shù)據(jù)后,在軟件中有顯示這個(gè)數(shù)據(jù)名,但是進(jìn)行查詢時(shí)沒有數(shù)據(jù),請(qǐng)問是什么原因?
測(cè)試樣例:
寫入rb000的收盤價(jià),名為“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技術(shù)人員:
TBQuant軟件更新114版本之后問題解決了。