# 债券交易函数
# bond_reverse_repurchase_agreement - 国债逆回购
仅在实盘中可以使用
bond_reverse_repurchase_agreement(symbol, volume, price, order_type=OrderType_Limit,
order_duration=OrderQualifier_Unknown, order_qualifier=OrderQualifier_Unknown, account_id='')
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | str | 标的代码 |
| volume | int | 认购数量 |
| price | float | 价格 |
| order_type | int | 委托类型 |
| account_id | str | 账户 ID,不指定则使用默认账户 |
返回值 List[Dict]
注意:
逆回购 1 张为 100 元。最少交易 10 张。且数量必须是 10 张的整数倍,也即一千元一个单位的买。
# bond_convertible_call - 可转债转股
仅在实盘中可以使用
bond_convertible_call(symbol, volume, price=0.0, account_id='')
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | str | 标的代码 |
| volume | int | 认购数量 |
| price | float | 价格 |
| account_id | str | 账户 ID,不指定则使用默认账户 |
返回值 List[Dict[Text, Any]]
# bond_convertible_put - 可转债回售
仅在实盘中可以使用
bond_convertible_put(symbol, volume, price=0.0, account_id='')
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | str | 标的代码 |
| volume | int | 认购数量 |
| price | float | 价格 |
| account_id | str | 账户 ID,不指定则使用默认账户 |
返回值 List[Dict[Text, Any]]
# bond_convertible_put_cancel - 可转债回售撤销
仅在实盘中可以使用
bond_convertible_put_cancel(symbol, volume, account_id='')
参数:
| 参数名 | 类型 | 说明 |
|---|---|---|
| symbol | str | 标的代码 |
| volume | int | 认购数量 |
| account_id | str | 账户 ID,不指定则使用默认账户 |
返回值 List[Dict[Text, Any]]