(一)獲取當(dāng)前?K線?對(duì)應(yīng)時(shí)間的時(shí)間戳函數(shù)ContextInfo.get_?bar_timetag()
用法:?ContextInfo.get_bar_timetag (index)。
釋義:獲取當(dāng)前K線對(duì)應(yīng)時(shí)間的時(shí)間戳。
參數(shù):number:K線索引號(hào)。
返回:number。
示例:
def handlebar(ContextInfo):
index = ContextInfo.barpos
print(ContextInfo.get_bar_timetag (index))
(二)獲取指數(shù)成份股函數(shù)?ContextInfo.get_ sector()
用法:ContextInfo.get_ sector(sector, realtime)。文章來源:http://www.zghlxwxcb.cn/news/detail-500908.html
釋義:獲取板塊成份股,只支持取指數(shù)成份股。文章來源地址http://www.zghlxwxcb.cn/news/detail-500908.html
到了這里,關(guān)于通過python 獲取股票數(shù)據(jù)的API接口的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!