📝 docs(tsl): sync api skill with corrected codegen

Mirror docs/tsl/codegen into the bundled tsl-api-reference skill and rebuild the function index.

Remove invalid duplicate API entries for cb_delistedbydate, createhttpsession, exportJsonString, and Anova_Bartlett so exact lookup returns the canonical entries.
This commit is contained in:
csh
2026-07-07 16:47:03 +08:00
parent bbf6977f57
commit c0bf0358e0
278 changed files with 45212 additions and 35782 deletions
@@ -1,24 +1,24 @@
# 债券 / 基本信息
### `bdActualIssueAmount()`
## `bd_ActualIssueAmount()`
实际发行总额(元),与系统证券pn_stock()有关。
返回:float
### `bdCouponRate()`
## `bd_CouponRate()`
票面利率(%/年),与系统证券pn_stock()有关。
返回:float
### `bdCouponType()`
## `bd_CouponType()`
息票品种,与系统股票pn_stock()有关。
返回:string
### `bdCouponTypeOfLido(bond_id)`
## `bd_CouponTypeOfLido(bond_id)`
息票品种。专用函数,仅个别Lido数据用户适用。
@@ -28,25 +28,25 @@
返回:string
### `bdDatedDate()`
## `bd_DatedDate()`
计息日,与系统证券pn_stock()有关。
返回:datetime
### `bdExpireDate()`
## `bd_ExpireDate()`
摘牌日,即获取债券的到期日。与系统证券pn_stock()有关。
返回:datetime
### `bdGoalDate()`
## `bd_GoalDate()`
到期日,与系统证券pn_stock()有关。
返回:datetime
### `bdIfInDuration(bond_id, end_t)`
## `bd_IfInDuration(bond_id, end_t)`
判断债券是否在存续期
@@ -57,19 +57,19 @@
返回:bool
### `bdInterestRateType()`
## `bd_InterestRateType()`
附息利率品种,与系统证券pn_stock()有关。
返回:string
### `bdInterestRateTypeData()`
## `bd_InterestRateTypeData()`
补充的附息利率品种数据。专用函数,仅个别Lido数据用户适用
返回:array
### `bdInterestRateTypeOfLido(bond_id)`
## `bd_InterestRateTypeOfLido(bond_id)`
附息利率品种。专用函数,仅个别Lido数据用户适用
@@ -79,31 +79,31 @@
返回:string
### `bdListDate()`
## `bd_ListDate()`
上市日,与系统证券pn_stock()有关。
返回:any
### `bdMaturity()`
## `bd_Maturity()`
偿还期限(年),与系统证券pn_stock()有关。
返回:float
### `bdPayTimes()`
## `bd_PayTimes()`
付息频率(次/年),与系统证券pn_stock()有关。
返回:any
### `bdPayTimesData()`
## `bd_PayTimesData()`
补充的付息频率数据。专用函数,仅个别Lido数据用户适用
返回:array
### `bdPayTimesOfLido(bond_id)`
## `bd_PayTimesOfLido(bond_id)`
付息频率,专用函数,仅个别Lido数据用户适用。
@@ -113,13 +113,13 @@
返回:any
### `bdShares()`
## `bd_Shares()`
债券流通股,与系统证券pn_stock()有关。
返回:float
### `bondExtraDataExist(t, bond_id)`
## `bondExtraDataExist(t, bond_id)`
判断BondId是否在数据表t中。如果存在,则返回BondId在表t中的行下标;如果不存在,则返回-1。
@@ -130,13 +130,13 @@
返回:int
### `bondInterBankIds2()`
## `bondInterBankIds2()`
所有的银行间债券(包含退市)。
返回:array
### `bondRatingByEndt(endt)`
## `bondRatingByEndt(endt)`
指定日最新债券评级,与系统参数(证券代码)相关。
@@ -146,14 +146,14 @@
返回:string
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'SH110073');
return BondRatingByEndt(20240819T);
```
### `bondRatingByEndtByInstitution(endt, institution)`
## `bondRatingByEndtByInstitution(endt, institution)`
指定日指定评级机构的债券评级,与系统参数(证券代码)相关。如果无该评级机构的评级,则返回""。
@@ -164,14 +164,14 @@ return BondRatingByEndt(20240819T);
返回:string
#### 示例
### 示例
```tsl
setsysparam(pn_stock(),'SH110073');
return BondRatingByEndtByInstitution(20240819T,"联合评级");
```
### `isBankBond(stock_id)`
## `isBankBond(stock_id)`
是否银行间债券。如果是,返回1,否则返回0 用stocktype(stockid)函数进行判断,type=18表示是银行间债券。
@@ -181,7 +181,7 @@ return BondRatingByEndtByInstitution(20240819T,"联合评级");
返回:bool
### `isConvertibleBond(bond_id)`
## `isConvertibleBond(bond_id)`
判断BondId是否为可转债,与系统证券pn_stock()有关。
@@ -191,17 +191,17 @@ return BondRatingByEndtByInstitution(20240819T,"联合评级");
返回:bool
### `isCorporationBond(stock_id)`
## `isCorporationBond(stock_id)`
判断StockID是否是企业债券,与系统证券pn_stock()有关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---------- | ------ | ---------------------- |
| `stock_id` | String | 证券类型,企业债券代码 |
返回:Boolean
#### 示例
### 示例
```tsl
//判断 97国电债是否是企业债券
@@ -209,17 +209,17 @@ return isCorporationBond('SH129801');
//结果:1
```
### `isBond(stock_id)`
## `isBond(stock_id)`
判断StockID是否是债券,与系统证券pn_stock()有关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---------- | ------ | -------- |
| `stock_id` | String | 证券类型 |
返回:Boolean
#### 示例
### 示例
```tsl
//返回” SH110003”是否是债券
@@ -227,17 +227,17 @@ return isBond("SH110003");
//结果:1
```
### `isGovBond(stock_id)`
## `isGovBond(stock_id)`
判断StockID是否是国债,与系统证券pn_stock()有关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---------- | ------ | ------------------ |
| `stock_id` | String | 证券类型,国债代码 |
返回:Boolean
#### 示例
### 示例
```tsl
//返回” BK000201”是否是国债
@@ -245,33 +245,33 @@ return isGovBond("BK000201");
//结果:0
```
### `bondConvertibleBonds2()`
## `bondConvertibleBonds2()`
所有的可转债。
返回:Array
#### 示例
### 示例
```tsl
// 所有的可转债
return bondConvertibleBonds2();
```
### `bondFutureCtdByEndt(end_t, return_option, market_id, dbtype)`
## `bondFutureCtdByEndt(end_t, return_option, market_id, dbtype)`
国债期货品种对应的指定日最便宜交割券,与系统证券代码相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| 参数 | 类型 | 说明 |
| --------------- | ---------- | ----------------------------- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
返回:String
#### 示例
### 示例
```tsl
//获得TF1809在20180913对应的IRR最便宜交割券
@@ -281,20 +281,20 @@ return bondFutureCtdByEndt(endt,0,1,0);
//结果:SH019542
```
### `bondFutureBasicFunc(end_t, return_option, market_id, dbtype)`
## `bondFutureBasicFunc(end_t, return_option, market_id, dbtype)`
国债期货品种对应的指定日基本指标函数,与系统证券代码相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| 参数 | 类型 | 说明 |
| --------------- | ---------- | ----------------------------- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
返回:String
#### 示例
### 示例
```tsl
//获得TF1809在20180913对应的IRR所有的指标信息数据
@@ -304,21 +304,21 @@ return bondFutureBasicFunc(endt,-1,1,0);
//结果:
```
### `bondFutureBondBasicValue(end_t, bond_id, return_option, market_id, dbtype)`
## `bondFutureBondBasicValue(end_t, bond_id, return_option, market_id, dbtype)`
国债期货品种对应的单个个券指定日指标,与系统证券代码相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 日期,截止日 |
| `bond_id` | string | 字符串,债券代码 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| 参数 | 类型 | 说明 |
| --------------- | ---------- | ----------------------------- |
| `end_t` | Date | 日期,截止日 |
| `bond_id` | string | 字符串,债券代码 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
返回:Real
#### 示例
### 示例
```tsl
//获得TF1809在20180913对应的基差值
@@ -329,20 +329,20 @@ return bondFutureBondBasicValue(endt,bond_id,0,0);
//结果:0.822400000000002
```
### `bondFutureBasicindicators(end_t, market_id, dbtype, return_option)`
## `bondFutureBasicindicators(end_t, market_id, dbtype, return_option)`
国债期货指定品种代码指定日对应的基本指标数据,与证券代码相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 日期,截止日 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| 参数 | 类型 | 说明 |
| --------------- | ---------- | ----------------------------- |
| `end_t` | Date | 日期,截止日 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
返回:Array
#### 示例
### 示例
```tsl
setSysParam(pn_Stock(),"TF1809");
@@ -350,20 +350,20 @@ endt:=20180819T;
return bondFutureBasicindicators(endt,1,0);
```
### `bondFutureBasicindicators2(end_t, return_option, market_id, dbtype)`
## `bondFutureBasicindicators2(end_t, return_option, market_id, dbtype)`
国债期货指定品种代码指定日对应的基本指标数据,与证券代码相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
| 参数 | 类型 | 说明 |
| --------------- | ---------- | ----------------------------- |
| `end_t` | Date | 日期,截止日 |
| `return_option` | UserDefine | 用户自定义, 返回结果选项 |
| `market_id` | UserDefine | 用户自定义, 国债市场选项 |
| `dbtype` | UserDefine | 用户自定义, 国债估值数据来源: |
返回:array
#### 示例
### 示例
```tsl
TF1809在20180819日对应的国债指标信息