✨ 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:
+47
@@ -0,0 +1,47 @@
|
||||
# 金融 / 期货 / 期货到期日
|
||||
|
||||
## `futuresdeliverydaysbyendt(futuresid, endt)`
|
||||
|
||||
声明:function
|
||||
|
||||
计算指定日期货离交割日的交易天数
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ----------- | -------- | ----------------- |
|
||||
| `futuresid` | security | security,期货合约 |
|
||||
| `endt` | date | date,指定日 |
|
||||
|
||||
返回:integer
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:调用函数
|
||||
|
||||
```tsl
|
||||
// 获取CU2101在2020-3-20日距离交割日的交易天数
|
||||
return futuresdeliverydaysbyendt('CU2101', 20200320T);
|
||||
// 输出:209
|
||||
```
|
||||
|
||||
## `qh_lastTradeDay(id)`
|
||||
|
||||
声明:function
|
||||
|
||||
按照期货合约规则得到期货的最后交易日
|
||||
|
||||
| 参数 | 类型 | 说明 |
|
||||
| ---- | ------ | -------- |
|
||||
| `id` | string | 期货代码 |
|
||||
|
||||
返回:datetime
|
||||
|
||||
### 示例
|
||||
|
||||
范例01:查询IF1210的最后交易日
|
||||
|
||||
```tsl
|
||||
// 查询IF1210的最后交易日
|
||||
|
||||
Return qh_LastTradeDay('IF1210');
|
||||
// 输出:41201,即2012-10-19
|
||||
```
|
||||
Reference in New Issue
Block a user