可转债
基础数据
目前,东财掘金量化支持上交所和深交所的交易标的查询。
| 交易所名称 | 市场代码 | 
|---|---|
| 上交所 | SHSE | 
| 深交所 | SZSE | 
Python 数据接口1
get_symbol_infos - 查询标的基本信息,获取指定(范围)交易标的基本信息,与时间无关。
get_symbols - 查询指定交易日多标的交易信息,获取指定交易日多个标的交易信息,包括基本信息及日度数据。
get_history_symbol - 查询指定标的多日交易信息,获取指定标的多个历史交易日的交易信息,包括基本信息及日度数据。
get_trading_dates_by_year - 查询年度交易日历,按年份查询从1991-01-01以来的交易日历。
get_trading_session - 查询交易时段,查询一个标的所属品种交易时间段。
get_contract_expire_rest_days - 查询合约到期剩余天数,查询可转债的到期剩余天数。
示例 1
获取“SHSE.113527”的基本信息:
get_symbol_infos(sec_type1=1030, symbols='SHSE.113527')
返回结果:
[{'symbol': 'SHSE.113527', 'sec_type1': 1030, 'sec_type2': 103001, 'board': 10300101, 'exchange': 'SHSE', 'sec_id': '113527', 'sec_name': '维格转债', 'sec_abbr': 'WGZZ', 'price_tick': 0.001, 'listed_date': datetime.datetime(2019, 2, 19, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'delisted_date': datetime.datetime(2025, 1, 24, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'underlying_symbol': 'SHSE.603518', 'conversion_start_date': datetime.datetime(2019, 7, 30, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'trade_n': 0, 'option_type': '', 'option_margin_ratio1': 0.0, 'option_margin_ratio2': 0.0, 'call_or_put': ''}]
示例 2
获取“SHSE.113527”的基本数据及最新日频数据:
get_symbols(sec_type1=1030, symbols='SHSE.113527', trade_date='2022-01-13')
返回结果:
[{'trade_date': datetime.datetime(2022, 1, 13, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'pre_close': 143.49, 'margin_ratio': 1.0, 'conversion_price': 9.85, 'multiplier': 1, 'is_adjusted': False, 'is_suspended': False, 'position': 0, 'settle_price': 0.0, 'pre_settle': 0.0, 'upper_limit': 0.0, 'lower_limit': 0.0, 'turn_rate': 0.0, 'adj_factor': 0.0, 'exercise_price': 0.0, 'is_st': False, 'symbol': 'SHSE.113527', 'sec_type1': 1030, 'sec_type2': 103001, 'board': 10300101, 'exchange': 'SHSE', 'sec_id': '113527', 'sec_name': '维格转债', 'sec_abbr': 'WGZZ', 'price_tick': 0.001, 'listed_date': datetime.datetime(2019, 2, 19, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'delisted_date': datetime.datetime(2025, 1, 24, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'underlying_symbol': 'SHSE.603518', 'conversion_start_date': datetime.datetime(2019, 7, 30, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'trade_n': 0, 'option_type': '', 'option_margin_ratio1': 0.0, 'option_margin_ratio2': 0.0, 'call_or_put': ''}]
示例 3
获取“SHSE.113527”在 2021-03-01 -- 2021-3-3 的历史信息数据:
get_history_symbol(symbol='SHSE.113527', start_date='2021-03-01', end_date='2021-03-03', df=False)
返回结果:
[{'trade_date': datetime.datetime(2021, 3, 1, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'pre_close': 80.16, 'margin_ratio': 1.0, 'conversion_price': 9.85, 'multiplier': 1, 'is_adjusted': False, 'is_suspended': False, 'position': 0, 'settle_price': 0.0, 'pre_settle': 0.0, 'upper_limit': 0.0, 'lower_limit': 0.0, 'turn_rate': 0.0, 'adj_factor': 0.0, 'exercise_price': 0.0, 'is_st': False, 'symbol': 'SHSE.113527', 'sec_type1': 1030, 'sec_type2': 103001, 'board': 10300101, 'exchange': 'SHSE', 'sec_id': '113527', 'sec_name': '维格转债', 'sec_abbr': 'WGZZ', 'price_tick': 0.001, 'listed_date': datetime.datetime(2019, 2, 19, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'delisted_date': datetime.datetime(2025, 1, 24, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'underlying_symbol': 'SHSE.603518', 'conversion_start_date': datetime.datetime(2019, 7, 30, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'trade_n': 0, 'option_type': '', 'option_margin_ratio1': 0.0, 'option_margin_ratio2': 0.0, 'call_or_put': ''},
 {'trade_date': datetime.datetime(2021, 3, 2, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'pre_close': 80.52, 'margin_ratio': 1.0, 'conversion_price': 9.85, 'multiplier': 1, 'is_adjusted': False, 'is_suspended': False, 'position': 0, 'settle_price': 0.0, 'pre_settle': 0.0, 'upper_limit': 0.0, 'lower_limit': 0.0, 'turn_rate': 0.0, 'adj_factor': 0.0, 'exercise_price': 0.0, 'is_st': False, 'symbol': 'SHSE.113527', 'sec_type1': 1030, 'sec_type2': 103001, 'board': 10300101, 'exchange': 'SHSE', 'sec_id': '113527', 'sec_name': '维格转债', 'sec_abbr': 'WGZZ', 'price_tick': 0.001, 'listed_date': datetime.datetime(2019, 2, 19, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'delisted_date': datetime.datetime(2025, 1, 24, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'underlying_symbol': 'SHSE.603518', 'conversion_start_date': datetime.datetime(2019, 7, 30, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'trade_n': 0, 'option_type': '', 'option_margin_ratio1': 0.0, 'option_margin_ratio2': 0.0, 'call_or_put': ''},
 {'trade_date': datetime.datetime(2021, 3, 3, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'pre_close': 80.2, 'margin_ratio': 1.0, 'conversion_price': 9.85, 'multiplier': 1, 'is_adjusted': False, 'is_suspended': False, 'position': 0, 'settle_price': 0.0, 'pre_settle': 0.0, 'upper_limit': 0.0, 'lower_limit': 0.0, 'turn_rate': 0.0, 'adj_factor': 0.0, 'exercise_price': 0.0, 'is_st': False, 'symbol': 'SHSE.113527', 'sec_type1': 1030, 'sec_type2': 103001, 'board': 10300101, 'exchange': 'SHSE', 'sec_id': '113527', 'sec_name': '维格转债', 'sec_abbr': 'WGZZ', 'price_tick': 0.001, 'listed_date': datetime.datetime(2019, 2, 19, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'delisted_date': datetime.datetime(2025, 1, 24, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'underlying_symbol': 'SHSE.603518', 'conversion_start_date': datetime.datetime(2019, 7, 30, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=28800), 'Asia/Shanghai')), 'trade_n': 0, 'option_type': '', 'option_margin_ratio1': 0.0, 'option_margin_ratio2': 0.0, 'call_or_put': ''}]
其他语言数据接口1
C#
- GetSymbolInfos - 查询标的基本信息
 - GetSymbols - 查询指定交易日多标的交易信息
 - GetHistorySymbol - 查询指定标的多日交易信息
 - GetTradingDatesByYear - 查询年度交易日历
 - GetTradingSession - 查询交易时段
 
C++
- get_symbol_infos - 查询标的基本信息
 - get_symbols_by_date - 查询指定交易日多标的交易信息
 - get_history_symbol - 查询指定标的多日交易信息
 - get_trading_dates_by_year - 查询年度交易日历
 - get_trading_session - 查询交易时段
 
MATLAB
- get_instrumentinfos - 查询交易标的基本信息
 - get_instruments - 查询最新交易标的最新基本信息
 - get_history_instruments - 查询交易标的历史基本信息
 - get_trading_dates - 查询交易日历表
 - get_previous_trading_date - 查询上一个交易日
 - get_next_trading_date - 查询下一个交易日
 
行情数据
实时行情数据
东财掘金量化目前支持获取国内两个市场的可转债实时行情数据。
包含 Tick 行情和 Bar 行情。
| 交易所名称 | 市场代码 | 
|---|---|
| 上交所 | SHSE | 
| 深交所 | SZSE | 
Tick - Tick 行情
快照行情, 包含以下内容:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| symbol | str | 标的代码 | 
| open | float | 开盘价 | 
| high | float | 最高价 | 
| low | float | 最低价 | 
| price | float | 最新价 | 
| cum_volume | int | 成交总量/最新成交量,累计值 | 
| cum_amount | float | 成交总金额/最新成交额,累计值 | 
| trade_type | int | 交易类型 1: ‘双开’, 2: ‘双平’, 3: ‘多开’, 4: ‘空开’, 5: ‘空平’, 6: ‘多平’, 7: ‘多换’, 8: ‘空换’ | 
| last_volume | int | 瞬时成交量 | 
| cum_position | int | 合约持仓量(期),累计值(股票此值为 0) | 
| last_amount | float | 瞬时成交额 (郑商所 last_amount 为 0) | 
| created_at | datetime.datetime | 创建时间 | 
| quotes | list[quote] | 股票提供买卖 1-5 档,list[0]~list[4]分别对应买卖一档到五档;跌停时无买方报价,涨停时无卖方报价 | 
| iopv | float | 基金份额参考净值,(只适用于基金) | 
Quote - 报价(dict)
| 参数名 | 类型 | 说明 | 
|---|---|---|
| bid_p | float | 买价 | 
| bid_v | int | 买量 | 
| ask_p | float | 卖价 | 
| ask_v | int | 卖量 | 
Bar - Bar 行情
支持以下多种频率的可转债实时行情数据:
| 交易所名称 | 市场代码 | 数据频率 | 
|---|---|---|
| 上交所 | SHSE | 60s, 300s, 900s, 1800s, 3600s | 
| 深交所 | SZSE | 60s, 300s, 900s, 1800s, 3600s | 
注:s 表示“秒”。
行情包含以下数据:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| symbol | str | 标的代码 | 
| frequency | str | 频率 | 
| open | float | 开盘价 | 
| close | float | 收盘价 | 
| high | float | 最高价 | 
| low | float | 最低价 | 
| amount | float | 成交额 | 
| volume | int | 成交量 | 
| bob | datetime.datetime | bar 开始时间 | 
| eob | datetime.datetime | bar 结束时间 | 
历史行情数据
东财掘金量化目前支持获取国内两个市场的可转债历史行情数据。
包含 Tick 行情和 Bar 行情。
| 交易所名称 | 市场代码 | 
|---|---|
| 上交所 | SHSE | 
| 深交所 | SZSE | 
Tick - Tick 行情
快照行情,包含以下内容:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| symbol | str | 标的代码 | 
| open | float | 开盘价 | 
| high | float | 最高价 | 
| low | float | 最低价 | 
| price | float | 最新价 | 
| cum_volume | int | 成交总量/最新成交量,累计值 | 
| cum_amount | float | 成交总金额/最新成交额,累计值 | 
| trade_type | int | 交易类型 1:‘双开’, 2:‘双平’, 3:‘多开’, 4:‘空开’, 5:‘空平’, 6:‘多平’, 7:‘多换’, 8:‘空换’ | 
| last_volume | int | 瞬时成交量 | 
| cum_position | int | 合约持仓量(期),累计值(股票该值为 0) | 
| last_amount | float | 瞬时成交额(郑商所 last_amount 为 0) | 
| created_at | datetime.datetime | 创建时间 | 
| quotes | list[quote] | 股票提供买卖 1-5 档,list[0]~list[4]分别对应买卖一档到五档;跌停时无买方报价,涨停时无卖方报价 | 
| iopv | float | 基金份额参考净值,(只适用于基金) | 
Quote - 报价(dict)
| 参数名 | 类型 | 说明 | 
|---|---|---|
| bid_p | float | 买价 | 
| bid_v | int | 买量 | 
| ask_p | float | 卖价 | 
| ask_v | int | 卖量 | 
Bar - Bar 行情
支持以下多种频率的可转债历史行情数据:
| 交易所名称 | 市场代码 | 频率以及数据范围 | 
|---|---|---|
| 上交所 | SHSE | 60s 以及 60s 的整数倍(2021-2-1 - 至今), 1d(1991-1-1 - 至今), 不提供 60s 以下数据 | 
| 深交所 | SZSE | 60s 以及 60s 的整数倍(2021-2-1 - 至今), 1d(1991-1-1 - 至今), 不提供 60s 以下数据 | 
注:s 表示“秒”, d 表示“天”。
行情包含以下数据:
| 参数名 | 类型 | 说明 | 
|---|---|---|
| symbol | str | 标的代码 | 
| frequency | str | 频率 | 
| open | float | 开盘价 | 
| close | float | 收盘价 | 
| high | float | 最高价 | 
| low | float | 最低价 | 
| amount | float | 成交额 | 
| volume | int | 成交量 | 
| bob | datetime.datetime | bar 开始时间 | 
| eob | datetime.datetime | bar 结束时间 | 
转股数据
Python 数据接口2
- bnd_get_conversion_price - 查询可转债转股价变动信息,查询可转债指定时间段内的转股价变动和转股结果。
 
其他语言数据接口2
C#
C++
回售和赎回
Python 数据接口3
bnd_get_put_info - 查询可转债回售信息,查询可转债在指定时间段内公告的回售信息。
bnd_get_call_info - 查询可转债赎回信息,查询可转债在指定时间段内公告的赎回信息。
其他语言数据接口3
C#
C++
剩余规模
Python 数据接口4
- bnd_get_amount_change - 查询可转债剩余规模变动,查询可转债转股、回售、赎回等事件导致的剩余规模变动的情况。
 
其他语言数据接口4
C#
C++