📝 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,6 +1,6 @@
# 基金 / 基本信息
### `fundGetAttributeValues(fundid, endt, attributetype)`
## `fundGetAttributeValues(fundid, endt, attributetype)`
基金指定日期有效的的基金属性值数据。
@@ -12,26 +12,26 @@
返回:array
### `fundMasterCode()`
## `fundMasterCode()`
基金主代码,与系统参数(证券代码代码)相关。有主代码则取主代码,否则返回基金代码。
返回:string
#### 示例
### 示例
```tsl
SetSysParam(pn_stock(),"OF012414");
return FundMasterCode();
```
### `fundNetValueMethod()`
## `fundNetValueMethod()`
返回指定指定基金净值增长率计算方法,与系统参数(代码、时间)相关。
返回:string
#### 示例
### 示例
```tsl
SetSysParam(pn_stock(),"OF000001");
@@ -39,7 +39,7 @@ SetSysParam(pn_date(),20210302T);
return FundNetValueMethod();
```
### `fundsOperateFunds(funds, end_t)`
## `fundsOperateFunds(funds, end_t)`
指定日指定列表中还在运作的基金
@@ -50,17 +50,17 @@ return FundNetValueMethod();
返回:array
### `isClassifyOfAFund(fund_id)`
## `isClassifyOfAFund(fund_id)`
判断是否是分级A基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH502049判断是否是分级A基金
@@ -68,17 +68,17 @@ return isClassifyOfAFund("SH502049");
//结果:1
```
### `isClassifyOfBFund(fund_id)`
## `isClassifyOfBFund(fund_id)`
判断是否是分级B基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH502049判断是否是分级B基金
@@ -86,17 +86,17 @@ return isClassifyOfBFund("SH502049");
//结果:0
```
### `isClassifyFund(fund_id)`
## `isClassifyFund(fund_id)`
判断是否是分级母基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------------ |
| `fund_id` | String | 证券类型,基金代码 |
返回:Integer
#### 示例
### 示例
```tsl
//判断SH500003 基金安信是否是分级母基金。
@@ -104,13 +104,13 @@ return fundCommision("SH500003");
//结果:0
```
### `fundGoMarketDate()`
## `fundGoMarketDate()`
上市日,与系统证券pn_stock()相关。
返回:Int
#### 示例
### 示例
```tsl
//取华安创新的上市日
@@ -119,13 +119,13 @@ ReturnFundGoMarketDate();
//结果:20010921
```
### `fundIssueDate()`
## `fundIssueDate()`
发行日,与系统股票pn_stock()相关。
返回:Int
#### 示例
### 示例
```tsl
//取信诚增强的发行日
@@ -134,17 +134,17 @@ ReturnFundIssueDate();
//结果:20100913
```
### `isDefinedFundImStyle(fund_type)`
## `isDefinedFundImStyle(fund_type)`
是否为指定的投资风格,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ----------- | ------- | -------- |
| `fund_type` | Integer | 基金类型 |
返回:boolean
#### 示例
### 示例
```tsl
//返回华安创新的投资风格是否为混合型
@@ -153,17 +153,17 @@ return isDefinedFundImStyle(0);
//结果:1
```
### `isExtFund(fund_id)`
## `isExtFund(fund_id)`
判断是否为基金,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为基金
@@ -171,17 +171,17 @@ return isExtFund('OF040001');
//结果:1
```
### `isFund(fund_id)`
## `isFund(fund_id)`
判断是否为基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断万科A是否为基金
@@ -189,17 +189,17 @@ return isFund('SZ000002');
//结果:0
```
### `isFundGoMarket(end_t)`
## `isFundGoMarket(end_t)`
指定日是否已上市,与系统证券pn_stock()相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | ---- | -------- |
| `end_t` | Date | 截止日期 |
返回:boolean
#### 示例
### 示例
```tsl
//返回华安创新在2001年05月01日是否已上市
@@ -208,17 +208,17 @@ ReturnIsFundGoMarket(intToDate(20010501));
//结果:0
```
### `isOpenFund(fund_id)`
## `isOpenFund(fund_id)`
判断是否为开放式基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | -------- |
| `fund_id` | String | 基金代码 |
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为开放式基金
@@ -226,13 +226,13 @@ ReturnIsOpenFund('OF040001');
//结果:1
```
### `isCurrencyFund()`
## `isCurrencyFund()`
判断是否为货币型基金,与系统证券pn_stock()相关。
返回:boolean
#### 示例
### 示例
```tsl
//判断华安创新是否为货币型基金
@@ -241,18 +241,18 @@ ReturnIsCurrencyFund();
//结果:0
```
### `nSharesOfFund(info_id, end_t)`
## `nSharesOfFund(info_id, end_t)`
基金流通股本,InfoId必须为324,324是基金份额变动表的索引号。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------ |
| `info_id` | Integer | 数据表索引号 |
| `end_t` | Date | 截止日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰 2010年5月3日的流通股本
@@ -261,18 +261,18 @@ return nSharesOfFund(324,intToDate(20100503));
//结果:1970000000
```
### `tSharesOfFund(info_id, end_t)`
## `tSharesOfFund(info_id, end_t)`
基金总股本,InfoId必须为324,324是基金份额变动表的索引号。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------- | ------------ |
| `info_id` | Integer | 数据表索引号 |
| `end_t` | Date | 截止日期 |
| `end_t` | Date | 截止日期 |
返回:Real
#### 示例
### 示例
```tsl
//取基金金泰2010年5月3日的基金总股本
@@ -281,121 +281,121 @@ return tSharesOfFund (324,intToDate(20100503));
//结果:2000000000
```
### `isregulapurchasescrollhold()`
## `isregulapurchasescrollhold()`
是否定期申购滚动持有,与系统参数(基金代码、日期)相关
返回:boolean
### `fundhsl2(rdate)`
## `fundhsl2(rdate)`
基金换手率(非分级子基金),换手率=本期股票成交金额/((期初股票市值+期末股票市值)/2)*100
基金换手率(非分级子基金),换手率=本期股票成交金额/((期初股票市值+期末股票市值)/2)\*100
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | --------------- | --------------- |
| `rdate` | reportingperiod | reportingperiod |
返回:real
### `fundoperationperiod()`
## `fundoperationperiod()`
运作期限(年),与系统参数(基金代码、日期)相关
返回:Integer
### `isminiholdperiod()`
## `isminiholdperiod()`
是否有最短持有期,与系统参数(基金代码、日期)相关
返回:boolean
### `isunrestrictedopening()`
## `isunrestrictedopening()`
是否无受限开放,与系统参数(基金代码、日期)相关
返回:boolean
### `isscrollhold()`
## `isscrollhold()`
是否滚动持有,与系统参数(基金代码、日期)相关
返回:boolean
### `fundpurchaseredemptiontype()`
## `fundpurchaseredemptiontype()`
指定基金申购赎回类型
返回:string
### `isregularredeem()`
## `isregularredeem()`
是否定期赎回,与系统参数(基金代码、日期)相关
返回:boolean
### `isregularopenfund()`
## `isregularopenfund()`
是否定期开放基金,与系统参数(基金代码、日期)相关
返回:boolean
### `isclosedoperation()`
## `isclosedoperation()`
是否封闭运作,与系统参数(基金代码、日期)相关
返回:boolean
### `fundsthemename(fundarr)`
## `fundsthemename(fundarr)`
基金列表主题
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | --------------- | ------------------------ |
| `fundarr` | array of string | array of string,基金列表 |
返回:array
### `fundthemename()`
## `fundthemename()`
基金主题
返回:string
### `fundallthemename()`
## `fundallthemename()`
所有基金主题
返回:array
### `fundinvestmentstyles()`
## `fundinvestmentstyles()`
基金投资风格种类
返回:array
### `fundallcompanylist()`
## `fundallcompanylist()`
基金公司List,与系统参数无关。
返回:array
### `isotherrestrictedopening()`
## `isotherrestrictedopening()`
是否其他受限开放,与系统参数(基金代码、日期)相关
返回:boolean
### `isCurrencyFundByEndt(endt)`
## `isCurrencyFundByEndt(endt)`
根据净值增长率计算方式判断是否为货币型基金    若以【每万份基金单位收益法】计算则认为是货币型
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | ---- | ------------ |
| `endt` | Date | 日期, 截止日 |
返回:Boolean
#### 示例
### 示例
```tsl
sp_s(pn_stock(),'OF110050');
@@ -403,51 +403,51 @@ end_t := 20200911T;
return isCurrencyFundByEndt(end_t); //结果:1
```
### `fundsFromManagerId(id)`
## `fundsFromManagerId(id)`
基金经理代码查基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ---- | ------ | -------------------- |
| `id` | String | 字符串。基金经理代码 |
返回:Array
#### 示例
### 示例
```tsl
return fundsFromManagerId('7289');
结果:
```
### `fundsFromManagerName(name)`
## `fundsFromManagerName(name)`
基金经理名字查基金。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------ | ------ | -------------------- |
| `name` | String | 字符串。基金经理名字 |
返回:Array
#### 示例
### 示例
```tsl
return fundsFromManagerName('张惠');
结果:
```
### `fundOfDifferentFeesId(fund_id)`
## `fundOfDifferentFeesId(fund_id)`
基金因其收费模式不一致存在多个代码,本模型通过基金代码返回不同收费模式所有基金代码
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| --------- | ------ | ------------- |
| `fund_id` | String | 证券,基金代码 |
返回:array
#### 示例
### 示例
```tsl
//返回OF000009不同收费模式所有基金的代码
@@ -455,70 +455,70 @@ return fundOfDifferentFeesId("OF000009");
//结果:array("OF000009","OF000010","OF000013","OF005122","OF018810")
```
### `isnotcontainswords(regexpr, parsetext)`
## `isnotcontainswords(regexpr, parsetext)`
不包含字串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
| 参数 | 类型 | 说明 |
| ----------- | ------ | ------------- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
返回:boolean
### `iscontainswords(regexpr, parsetext)`
## `iscontainswords(regexpr, parsetext)`
包含字串
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
| 参数 | 类型 | 说明 |
| ----------- | ------ | ------------- |
| `regexpr` | string | string,匹配串 |
| `parsetext` | string | string,源串 |
返回:boolean
### `isthepurchaseredemptiontype(fundname, containstr, notcontainstr)`
## `isthepurchaseredemptiontype(fundname, containstr, notcontainstr)`
是否指定申购赎回类型,通过基金全称判断。与系统参数(基金代码、日期)相关。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fundname` | string | string,基金名称 |
| `containstr` | string | string,包含字符串 |
| 参数 | 类型 | 说明 |
| --------------- | ------ | --------------------- |
| `fundname` | string | string,基金名称 |
| `containstr` | string | string,包含字符串 |
| `notcontainstr` | string | string,不包含的字符串 |
返回:boolean
### `fundthemegetmatchstr()`
## `fundthemegetmatchstr()`
基金主题匹配串
返回:array
### `fundthemematchstring()`
## `fundthemematchstring()`
基金主题匹配串
返回:array
### `fundgetthemename(fundname, matchstring)`
## `fundgetthemename(fundname, matchstring)`
基金主题
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `fundname` | string | string,基金名称 |
| `matchstring` | table | table,匹配串 |
| 参数 | 类型 | 说明 |
| ------------- | ------ | --------------- |
| `fundname` | string | string,基金名称 |
| `matchstring` | table | table,匹配串 |
返回:string
### `fundName()`
## `fundName()`
返回指定基金指定日名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//OF162206在20210302的基金名称
@@ -528,50 +528,50 @@ return fundName();
//返回:泰达宏利货币市场基金
```
### `fundOperationFunds(end_t)`
## `fundOperationFunds(end_t)`
指定日所有运作中的基金列表
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| 参数 | 类型 | 说明 |
| ------- | --------- | -------------- |
| `end_t` | TDateTime | 日期。截止日期 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日所有运作中的基金列表
return fundOperationFunds(20200924T);
```
### `fundOperationFundsByTzfg(bk_name, end_t, industry_type, level)`
## `fundOperationFundsByTzfg(bk_name, end_t, industry_type, level)`
指定日指定投资风格板块运作中的基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| `industry_type` | Integer | 用户自定义。分类类型,取值如下: |
| `level` | Integer | 整数。分类级别 |
| 参数 | 类型 | 说明 |
| --------------- | --------- | ------------------------------- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| `industry_type` | Integer | 用户自定义。分类类型,取值如下: |
| `level` | Integer | 整数。分类级别 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日“普通股票型”运作中的基金
return fundOperationFundsByTzfg("普通股票型",20200924T,0,2);
```
### `fundPrimaryMarketCode()`
## `fundPrimaryMarketCode()`
基金一级市场代码,与系统参数(证券代码代码)相关。有一级市场代则取一级市场代,否则返回基金代码。
返回:String
#### 示例
### 示例
```tsl
//通过基金交易代码(二级市场)得到该基金的一级市场代码
@@ -580,13 +580,13 @@ return fundPrimaryMarketCode();
//返回:OF510050
```
### `fundSecondaryMarketCode()`
## `fundSecondaryMarketCode()`
基金二级市场代码,与系统参数(证券代码代码)相关。有二级市场代码则取二级市场代码,否则返回基金代码。
返回:String
#### 示例
### 示例
```tsl
//OF510050的基金二级市场代码
@@ -595,13 +595,13 @@ return fundSecondaryMarketCode();
//返回:SH510050
```
### `fundStyleName1()`
## `fundStyleName1()`
返回指定指定基金一级风格名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//华夏成长在20210302的基金一级风格名称
@@ -611,13 +611,13 @@ return fundStyleName1();
//返回:混合型
```
### `fundStyleName2()`
## `fundStyleName2()`
返回指定指定基金二级风格名称,与系统参数(代码、时间)相关。
返回:String
#### 示例
### 示例
```tsl
//华夏成长在20210302的基金二级风格名称
@@ -627,18 +627,18 @@ return fundStyleName2();
//返回:偏股混合
```
### `fundOperateFundsbyBkname(bk_name, end_t)`
## `fundOperateFundsbyBkname(bk_name, end_t)`
指定日指定板块中还在运作的基金
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
| 参数 | 类型 | 说明 |
| --------- | --------- | ---------------- |
| `bk_name` | String | 字符串。板块名称 |
| `end_t` | TDateTime | 日期。截止日期 |
返回:Array
#### 示例
### 示例
```tsl
// 20200924日指定日指定板块中还在运作的基金列表