TBPY獲取不到數據 [開拓者 TB]
-
咨詢內容:
以下是我的的代碼,返回的是一個空字典,這是什么原因呢
# -*- coding:utf-8 -*-
import tbpy, datetime
def get_data():
? ? print(tbpy.init())
? ? symbols = ['TA000.CZCE']
? ? freq = '1d'
? ? begin_time = datetime.datetime.strptime('2019501', '%Y%m%d')
? ? end_time = datetime.datetime.strptime('20200512', '%Y%m%d')
? ? bars = tbpy.get_history(symbols, freq, begin_time, end_time)
? ? print(bars)
? ? # return bars
if __name__ == '__main__':
? ? get_data()
# 返回結果
? ? True
? ? {}
有思路,想編寫各種指標公式,交易模型,選股公式,還原公式的朋友
可聯系技術人員 QQ: 262069696 或微信號:cxh99cxh99 進行 有償收費 編寫!
(注:由于人數限制,QQ或微信請選擇方便的一個聯系我們就行,加好友時請簡單備注下您的需求,否則無法通過。謝謝您!)
相關文章
-
沒有相關內容