✨ 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:
+208
@@ -0,0 +1,208 @@
|
||||
# 金融 / 期权 / 期权主力合约
|
||||
|
||||
## `optionFlatValueId(index_id, end_t, option_type)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定标的的平值合约,只适用于日线
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------------- | ----------- | ------------------------------- |
|
||||
| `index_id` | string | 字符串。标的代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
| `option_type` | integer | 用户自定义。期权类型,取值如下: |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "SH510050"在20210331日的认购的平值合约
|
||||
return optionFlatValueId("SH510050", 20210331T, 0);
|
||||
```
|
||||
|
||||
## `optionIsFlatValueId(option_id, end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否平值合约
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------- | ----------- | ---------------- |
|
||||
| `option_id` | string | 字符串。期权代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否平值合约
|
||||
return optionIsFlatValueId("OP10003265", 20210331T);
|
||||
// 输出:1
|
||||
```
|
||||
|
||||
## `optionIsFlatValueId2(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否平值合约,与系统参数(股票)相关
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ----------- | -------------- |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否平值合约
|
||||
setSysParam(pn_stock(), "OP10003265");
|
||||
return optionIsFlatValueId2(20210331T);
|
||||
// 输出:1
|
||||
```
|
||||
|
||||
## `optionIsRealValueId(option_id, end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否实值合约
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------- | ----------- | ---------------- |
|
||||
| `option_id` | string | 字符串。期权代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否实值合约
|
||||
return optionIsRealValueId("OP10003265", 20210331T);
|
||||
// 输出:0
|
||||
```
|
||||
|
||||
## `optionIsRealValueId2(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否实值合约,与系统参数(股票)相关
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ----------- | -------------- |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否实值合约
|
||||
setSysParam(pn_stock(), "OP10003265");
|
||||
return optionIsRealValueId2(20210331T);
|
||||
// 输出:0
|
||||
```
|
||||
|
||||
## `optionIsVirtualValueId(option_id, end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否虚值合约
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------- | ----------- | ---------------- |
|
||||
| `option_id` | string | 字符串。期权代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否虚值合约
|
||||
return optionIsVirtualValueId("OP10003265", 20210331T);
|
||||
// 输出:0
|
||||
```
|
||||
|
||||
## `optionIsVirtualValueId2(end_t)`
|
||||
|
||||
声明:function
|
||||
|
||||
指定期权代码是否虚值合约,与系统参数(股票)相关
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------- | ----------- | -------------- |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "OP10003265 50ETF购4月3600"在20210331日是否虚值合约
|
||||
setSysParam(pn_stock(), "OP10003265");
|
||||
return optionIsVirtualValueId2(20210331T);
|
||||
// 输出:0
|
||||
```
|
||||
|
||||
## `optionRealValueId(index_id, end_t, option_type)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定标的的实值合约。只适用于日线
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------------- | ----------- | ------------------------------- |
|
||||
| `index_id` | string | 字符串。标的代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
| `option_type` | integer | 用户自定义。期权类型,取值如下: |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "SH510050"在20210331日的认购的实值合约
|
||||
return optionRealValueId("SH510050", 20210331T, 0);
|
||||
```
|
||||
|
||||
## `optionVirtualValueId(index_id, end_t, option_type)`
|
||||
|
||||
声明:function
|
||||
|
||||
返回指定日指定标的的虚值合约,只适用于日线
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ------------- | ----------- | ------------------------------- |
|
||||
| `index_id` | string | 字符串。标的代码 |
|
||||
| `end_t` | t_date_time | 日期。截止日期 |
|
||||
| `option_type` | integer | 用户自定义。期权类型,取值如下: |
|
||||
|
||||
返回:array
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// "SH510050"在20210331日的认购的虚值合约
|
||||
return optionVirtualValueId("SH510050", 20210331T, 0);
|
||||
```
|
||||
Reference in New Issue
Block a user