说明 / 示例
用法: ContextInfo.get_instrumentdetail(stockcode)
释义: 根据代码获取合约详细信息
参数:
stockcode:string,股票代码,如’600000.SH’
**返回:**根据stockcode返回一个dict。该字典数据key值有:
ExchangeID:合约市场代码
InstrumentID:合约代码
InstrumentName:合约名称
ProductID:合约的品种ID(期货)
ProductName:合约的品种名称(期货)
CreateDate:上市日期(期货)
OpenDate:IPO日期(股票)
ExpireDate:退市日或者到期日
PreClose:前收盘价格
SettlementPrice:前结算价格
UpStopPrice:当日涨停价
DownStopPrice:当日跌停价
FloatVolumn:流通股本
TotalVolumn:总股本
LongMarginRatio:多头保证金率
ShortMarginRatio:空头保证金率
PriceTick:最小变价单位
VolumeMultiple:合约乘数(对期货以外的品种,默认是1)
MainContract:主力合约标记
LastVolume:昨日持仓量
InstrumentStatus:合约停牌状态
IsTrading:合约是否可交易
IsRecent:是否是近月合约
示例:
```py
def handlebar(ContextInfo):
print ContextInfo.get_instrumentdetail('600000.SH')
```