QMT · 内置 Python行情函数
ContextInfo.get_convert_bond_info
获取存续期内可转债正股标的代码及最新转股价
原型
ContextInfo.get_convert_bond_info(bondcode)
参数
| 参数 | 类型 | 说明 |
|---|---|---|
| bondcode | string | 可转债代码,例如 110059.SH。 |
返回值
根据bondcode返回一个dict。该字典数据key值有: stockcode:正股标的代码 convert_price:转股价
示例
以下代码依据官方示例整理缩进,并将旧式 print 写法改为函数调用;账号使用占位值。
def handlebar(ContextInfo):
print(ContextInfo.get_convert_bond_info('110059.SH'))
官方来源
迅投 QMT 官方函数检索表,条目 ContextInfo.get_convert_bond_info。本页属于 QMT 内置 Python 接口;原站函数检索表同时收录其他语言,不能按网页路径将本条目误归为 VBA。网页核对日期:2026-10-11。