QMT · 内置 Python行情函数
ContextInfo.get_his_st_data
获取某只股票ST的历史
提示
本函数需要下载历史ST数据(过期合约K线),可通过界面端数据管理 - 过期合约数据下载
原型
ContextInfo.get_his_st_data(stockcode)
释义
获取某只股票ST的历史
参数
| 字段名 | 数据类型 | 解释 |
|---|---|---|
stockcode |
string |
股票代码,'stkcode.market',如'000004.SZ' |
返回值
dict,st历史,key为ST,*ST,PT,历史未ST会返回{}
示例
示例
# coding:gbk
def init(C):
pass
def handlebar(C):
print(C.get_his_st_data('000004.SZ'))
返回值
{'ST': [['19990427', '20010306'], ['20070525', '20090421'], ['20100531', '20110608'], ['20220506', '20230628']], '*ST': [['20060421', '20070525'], ['20090421', '20100531']]}
官方来源
QMT 官方文档:获取某只股票ST的历史。网页核对日期:2026-10-11。