get_enable_short_contract - 获取可融券明细
get_enable_short_contract 是 QMT 内置 Python 中用于获取可融券明细的接口。
原型
get_enable_short_contract(accId)
释义
get_enable_short_contract 是 QMT 内置 Python 中用于获取可融券明细的接口。
研究:官方目录未明确;回测:官方目录未明确;模拟:官方目录未明确;实盘:官方目录未明确。
参数
| 参数 | 是否必填 | 官方原始定义 |
|---|---|---|
accId |
是 | accId |
返回值
以实际接口返回和下方详细说明为准。
示例
python
def show_data(data):
tdata = {}
for ar in dir(data):
if ar[:2] != 'm_':continue
try:
tdata[ar] = data.__getattribute__(ar)
except:
tdata[ar] = '<CanNotConvert>'
return tdata
def handlebar(ContextInfo):
obj = get_enable_short_contract('6000000248')
for i in obj[:3]:
print(show_data(i))
"""
Rerutn:
{'m_eQuerySloType': 48, # 查询类型
'm_nEnableAmount': 0, # 融券可融数量
'm_nPlatformID': 10064, # 平台号
'm_strAccountID': '95000857', # 资金账号
'm_strBrokerID': '003', # 经纪公司编号
'm_strBrokerName': '光大证券信用', # 证券公司
'm_strExchangeID': 'SH', # 标的市场
'm_strInstrumentID': '688321' # 证券代码
}
"""
详细说明
使用提示
注:由于字段m_dSloRatio、m_dSloStatus提供来源和取担保品明细(get_assure_contract)重复,字段在2021年9月移除,后续用担保品明细接口获取,具体见 担保标的对象字段说明
用法: get_enable_short_contract(accId)
释义: 获取信用账户当前可融券的明细
参数详细说明
accId:信用账户
返回: list,list 中放的是 CreditSloEnableAmount,通过 dir(pythonobj) 可返回某个对象的属性列表。