feat(tsl-api-reference): expand and reorganize api catalog

Flatten builtin pages, add third-party and platform scopes, and import financial and data warehouse references.

Keep the existing generated index without rebuilding after signature normalization.
This commit is contained in:
csh
2026-08-10 18:26:24 +08:00
parent 2938300acb
commit 9010829c6d
1186 changed files with 243901 additions and 219769 deletions
@@ -0,0 +1,323 @@
# 金融 / 期权 / 基本信息
## `op_residualMaturity(maturity_unit)`
声明:function
期权剩余期限(日历日),与系统证券、时间相关,仅支持日线
| 参数 | 类型 | 说明 |
| --------------- | ---- | ---------------------------------- |
| `maturity_unit` | int | 剩余期限单位,整型,默认以年为单位 |
返回:float
### 示例
范例01:调用 OP_ResidualMaturity
```tsl
endt := 20221220T;
setsysparam(pn_stock(), "OP10004850");
setsysparam(pn_date(), endt);
return OP_ResidualMaturity(); // 0.0219(年)
```
## `optionContractUnit(endt)`
声明:function
期权指定日合约单位,与系统参数(代码)相关
| 参数 | 类型 | 说明 |
| ------ | -------- | -------------- |
| `endt` | datetime | 日期。截止日期 |
返回:int
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "CU2101C39000");
return OptionContractUnit(20210201T);
```
## `optioninfoceilingprice(endt)`
声明:function
取期权基本信息表,然后该日涨幅上限价格
| 参数 | 类型 | 说明 |
| ------ | -------- | -------- |
| `endt` | datetime | 截止日期 |
返回:float
## `optionInfoConsSuspended(end_t)`
声明:function
指定期权指定日是否连续停牌,与系统参数(证券代码)相关。 1)如果指定日有期权基本信息,返回是否连续停牌 2)如果指定日没有期权基本信息,返回空字符串
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | datetime | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10004233");
return OptionInfoConsSuspended(20220627T);
// 输出:否
```
## `optionInfoEndTBetweenMaturityDays(end_t)`
声明:function
指定期权指定日距离到期日的交易日天数,与系统参数(证券代码)相关
| 参数 | 类型 | 说明 |
| ------- | ---- | ------------------ |
| `end_t` | date | 日期类型,截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// "IO2306-P-4200"在2022-6-27距离到期日天数
setSysParam(pn_stock(), "IO2306-P-4200");
return optionInfoEndTBetweenMaturityDays(20220627T);
// 输出:249
```
## `optionInfoFloorPrice(end_t)`
声明:function
指定期权指定日跌幅下限价格,与系统参数(证券代码)相关。 1)如果指定日有期权基本信息,返回跌幅下限价格 2)如果指定日没有期权基本信息,返回0
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | datetime | 日期类型,截止日期 |
返回:float
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10004233");
return OptionInfoFloorPrice(20220627T);
// 输出:0.57
```
## `optionInfoIsBetweenMaturityLess5Days(end_t)`
声明:function
指定期权指定日是否距离到期日不足5个交易日,与系统参数(证券代码)相关。 1)如果指定日有期权基本信息,返回是否距离到期日不足5个交易日 2)如果指定日没有期权基本信息,返回空字符串
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | datetime | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10004233");
return OptionInfoIsBetweenMaturityLess5Days(20220627T);
// 输出:否
```
## `optionInfoIsNewContract(end_t)`
声明:function
指定期权指定日是否新挂牌合约,与系统参数(证券代码)相关
| 参数 | 类型 | 说明 |
| ------- | ---- | ------------------ |
| `end_t` | date | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
// "OP10004233"在2022-6-27的是否新挂牌合约
setSysParam(pn_stock(), "OP10004233");
return optionInfoIsNewContract(20220627T);
// 输出:否
```
## `optionInfoIsTradeRange(end_t)`
声明:function
期权指定日是否在市
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------- |
| `end_t` | datetime | 日期,截止日期 |
返回:any类型
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "CF201C13800");
return OptionInfoIsTradeRange(20210924T);
// 输出:1
```
## `optionInfoLast5DayContractAdjusted(end_t)`
声明:function
指定期权指定日最近5个交易日内合约是否发生过调整,与系统参数(证券代码)相关。 1)如果指定日有期权基本信息,返回判断最近5个交易日内合约是否发生过调整 2)如果指定日没有期权基本信息,返回空字符串
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | datetime | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10004233");
return OptionInfoLast5DayContractAdjusted(20220627T);
// 输出:否
```
## `optionInfoOpenPosition(end_t)`
声明:function
指定期权指定日开仓状态,与系统参数(证券代码)相关
| 参数 | 类型 | 说明 |
| ------- | ---- | ------------------ |
| `end_t` | date | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
// "OP10004233"在2022-6-27的开仓状态
setSysParam(pn_stock(), "OP10004233");
return optionInfoOpenPosition(20220627T);
// 输出:可开仓
```
## `optionInfoStatusInfo(end_t)`
声明:function
指定期权指定日期权合约状态信息,与系统参数(证券代码)相关。 1)如果指定日有期权基本信息,返回判断最近5个交易日内合约是否发生过调整 2)如果指定日没有期权基本信息,返回空字符串。 目前是 5位字符串,每位表示特定的含义: 第1位:‘0’表示可开仓,‘1’表示限制 卖出开仓(不包括备兑开仓)和买入开仓。 第2位:‘0’表示未连续停牌,‘1’表示 连续停牌。(预留,暂填 0) 第3位:‘0’表示未临近到期日,‘1’表 示距离到期日不足 5个交易日。 第4位:‘0’表示近期未做调整,‘1’表 示最近 5个交易日内合约发生过调整。 第5位:‘A’表示当日新挂牌的合约, ‘E’表示存续的合约 具体可见下面 5个字段
| 参数 | 类型 | 说明 |
| ------- | -------- | ------------------ |
| `end_t` | datetime | 日期类型,截止日期 |
返回:string
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10004233");
return OptionInfoStatusInfo(20220627T);
// 输出:0000E0
```
## `optionInfoStrikePrice(end_t)`
声明:function
指定日行权价,与系统参数(代码)相关。如果指定日有期权基本信息,返回该日行权价;如果指定日没有期权基本信息,返回0
| 参数 | 类型 | 说明 |
| ------- | -------- | -------------- |
| `end_t` | datetime | 日期。截止日期 |
返回:float
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "OP10008613");
endt := 20250123T;
return OptionInfoStrikePrice(Endt);
```
## `optionInfoUnitDeposit(end_t)`
声明:function
指定期权指定日单位保证金,与系统参数(证券代码)相关
| 参数 | 类型 | 说明 |
| ------- | ---- | ------------------ |
| `end_t` | date | 日期类型,截止日期 |
返回:real
### 示例
范例01:调用函数
```tsl
// "OP10004233"在2022-6-27的单位保证金
setSysParam(pn_stock(), "OP10004233");
return optionInfoUnitDeposit(20220627T);
// 输出:15425.6
```
## `optionToPZ()`
声明:function
通过期权代码获取期权品种代码,与系统参数(代码)相关
返回:string
### 示例
范例01:调用函数
```tsl
SetSysParam(pn_stock(), "CU2101C39000");
return OptionToPZ();
```