Files
playbook/skills/tsl-api-reference/references/codegen/dotnet/equity/industry.md
T
csh 13be5ea0aa feat(tsl-api-reference): index class and unit APIs
Migrate reference pages to declaration-line storage and rebuild the
13-column index.

Add qualified member lookup plus regression and end-to-end coverage.
2026-07-29 15:47:46 +08:00

421 lines
9.4 KiB
Markdown

# 股票 / 行业
## `getDiyuList()`
声明:function
得到地域列表。由于数据提供的问题,用此方法比用GETBKList('地域')更准确。
返回:array
## `getDiyuStocks(name)`
声明:function
得到地域股票。
| 参数 | 类型 | 说明 |
| ------ | ------ | ---------------- |
| `name` | string | 字符串。地域名称 |
返回:array
## `getFenleiList()`
声明:function
得到分类列表。
返回:array
## `getFenleiStocks(name)`
声明:function
得到分类股票。
| 参数 | 类型 | 说明 |
| ------ | ------ | ---------------- |
| `name` | string | 字符串。分类名称 |
返回:array
## `getHangyeList()`
声明:function
得到行业列表。由于数据提供的问题,用此方法比用GETBKList('行业')更准确。
返回:array
## `getHangyeStocks(name)`
声明:function
得到行业股票。
| 参数 | 类型 | 说明 |
| ------ | ------ | ---------------- |
| `name` | string | 字符串。行业名称 |
返回:array
## `getHyDyFlDetails(_type)`
声明:function
得到分行业/地域/分类的股票的详细情况。
| 参数 | 类型 | 说明 |
| ------- | ------ | --------------------- |
| `_type` | string | 用户自定义。取值如下: |
返回:array
## `getHyDyFlList(_type)`
声明:function
得到行业/地域/分类的列表,用于替代GetBKList。
| 参数 | 类型 | 说明 |
| ------- | ------ | --------------------------- |
| `_type` | string | 用户自定义。类别,取值如下: |
返回:array
## `getHyDyFlStocks(_type, name)`
声明:function
得到行业的股票。取代GetBK,比其更精确。
| 参数 | 类型 | 说明 |
| ------- | ------ | --------------------------- |
| `_type` | string | 用户自定义。类型,取值如下: |
| `name` | string | 字符串。名称 |
返回:array
## `getStocksByName(name)`
声明:function
根据名称得到股票列表。
| 参数 | 类型 | 说明 |
| ------ | ------ | ------------ |
| `name` | string | 字符串。名称 |
返回:array
## `stockCsrcIndustryArr(level_n, end_t)`
声明:function
返回指定日指定级别证监会行业列表。目前天软只有证监会最新版的2012版的上市公司行业分类指引数据,所以endt参数暂时没有作用。
| 参数 | 类型 | 说明 |
| --------- | -------- | -------------- |
| `level_n` | int | 整数。行业级数 |
| `end_t` | datetime | 日期。截止日期 |
返回:array
## `stockCsrcIndustryId1()`
声明:function
指定证券指定日期证监会一级行业代码,与系统参数(股票、时间)相关。
返回:string
### 示例
```tsl
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockCSRCIndustryID1();
```
## `stockCsrcIndustryId2()`
声明:function
指定证券指定日期证监会二级行业代码,与系统参数(股票、时间)相关。
返回:string
### 示例
```tsl
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockCSRCIndustryID2();
```
## `stockCsrcIndustryName1()`
声明:function
指定证券指定日期证监会一级行业名称,与系统参数(股票、时间)相关。
返回:string
### 示例
```tsl
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockCSRCIndustryName1();
```
## `stockCsrcIndustryName2()`
声明:function
指定证券指定日期证监会二级行业名称,与系统参数(股票、时间)相关。
返回:string
### 示例
```tsl
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockCSRCIndustryName2();
```
## `stockGetIndustrydata(stockid, end_t, level, industry_type)`
声明:function
返回证券指定日期有效的行业数据。
| 参数 | 类型 | 说明 |
| --------------- | -------- | ----------------------- |
| `stockid` | string | 字符串。证券代码 |
| `end_t` | datetime | 日期。截止日期 |
| `level` | int | 整数。行业级数(1,2,3) |
| `industry_type` | string | 字符串。行业属性名称 |
返回:array
## `stockIndustryArr(industry_type, level_n, end_t)`
声明:function
返回指定日指定级别行业列表,与系统参数(股票)相关。默认返回申万行业的一级行业列表。
| 参数 | 类型 | 说明 |
| --------------- | -------- | ---------------- |
| `industry_type` | string | 字符串。行业类别 |
| `level_n` | int | 整数。行业级数 |
| `end_t` | datetime | 日期。截止日期 |
返回:array
## `stockindustryindexid(industryid, endt)`
声明:function
行业代码对应的指数代码,返回行业代码指定日期对应的指数代码
| 参数 | 类型 | 说明 |
| ------------ | -------- | ----------------- |
| `industryid` | Security | Security,行业代码 |
| `endt` | datetime | 日期,截止日期 |
返回:string
## `stockIndustryInfoLvN(stock_id, end_t, level, industry_type, v_type)`
声明:function
指定证券指定日期指定级别行业名称,默认取申万的一级行业代码。
| 参数 | 类型 | 说明 |
| --------------- | -------- | --------------------------------- |
| `stock_id` | string | 字符串。证券代码 |
| `end_t` | datetime | 日期。截止日期 |
| `level` | int | 整数。行业级别 |
| `industry_type` | string | 字符串。行业分类 |
| `v_type` | int | 用户自定义。返回值类型,取值如下: |
返回:string
## `stockswindustryarr(leveln, endt)`
声明:function
返回指定日指定级别申万行业列表
| 参数 | 类型 | 说明 |
| -------- | -------- | ------------- |
| `leveln` | int | 整型,行业级数 |
| `endt` | datetime | 日期,截止日期 |
返回:array
## `stockswindustryid1()`
声明:function
申万一级行业编码,返回指定证券指定日期申申万一级行业代码
返回:string
### 示例
```tsl
万科A在20210302的申万一级行业代码
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryID1(); //返回:SWHY430000
```
## `stockswindustryid2()`
声明:function
申万二级行业编码,返回指定证券指定日期申申万二级行业代码
返回:string
### 示例
```tsl
万科A在20210302的申万二级行业代码
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryID2(); //返回:SWHY430100
```
## `stockswindustryid3()`
声明:function
申万三级行业编码,返回指定证券指定日期申申万三级行业代码
返回:string
### 示例
```tsl
万科A在20210302的申万三级行业代码
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryID3(); //返回:SWHY430101
```
## `StockSWIndustryIDLv1_II()`
声明:function
指定证券指定日期的申万一级行业指数代码(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string|datetime
## `StockSWIndustryIDLv2_II()`
声明:function
指定证券指定日期的申万二级行业指数代码(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string|datetime
## `StockSWIndustryIDLv3_II()`
声明:function
指定证券指定日期的申万三级行业指数代码(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string|datetime
## `stockswindustryname1()`
声明:function
返回指定证券指定日期申万一级行业名称
返回:string
### 示例
```tsl
万科A在20210302的一级申万行业名称
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryName1(); //返回:申万房地产
```
## `stockswindustryname2()`
声明:function
返回指定证券指定日期申万二级行业名称
返回:string
### 示例
```tsl
万科A在20210302的二级申万行业名称
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryName2(); //返回:申万房地产开发
```
## `stockswindustryname3()`
声明:function
返回指定证券指定日期申万三级行业名称
返回:string
### 示例
```tsl
万科A在20210302的三级申万行业名称
SetSysParam(pn_stock(),"SZ000002");
SetSysParam(pn_date(),20210302T);
return StockSWIndustryName3(); //返回:申万房地产开发
```
## `StockSWIndustryNameLv1_II()`
声明:function
指定证券指定日期的申万一级行业指数名称(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string
## `StockSWIndustryNameLv2_II()`
声明:function
指定证券指定日期的申万二级行业指数名称(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string
## `StockSWIndustryNameLv3_II()`
声明:function
指定证券指定日期的申万三级行业指数名称(考虑非指数成分),与系统参数(股票、时间)相关。
返回:string
## `trimHangyeName(name)`
声明:function
行业名称去间隔。
| 参数 | 类型 | 说明 |
| ------ | ------ | ---------------- |
| `name` | string | 字符串。行业名称 |
返回:string