📦 deps(tsl): sync tsl-playbook from a71480a4

Source-Commit: a71480a4ae
This commit is contained in:
ci[bot]
2026-08-12 08:38:08 +08:00
parent 683f83d17c
commit 670ba950a6
1496 changed files with 292667 additions and 220122 deletions
@@ -0,0 +1,116 @@
# 金融 / 外汇 / 汇率
## `forExrateMidPrice(end_t)`
声明:function
返回指定日汇率中间价,与系统参数(外汇代码)相关
<!-- tags: 金融 外汇 汇率 返回 获取 -->
| 参数 | 类型 | 说明 |
| ------- | --------- | ------------------ |
| `end_t` | tdatetime | 日期类型,截止日期 |
返回:real
### 示例
范例01:2020年4月20日美元/人民币的中间价
```tsl
// 2020年4月20日美元/人民币的中间价
SetSysParam(PN_Stock(), 'FXUSDCNY');
return ForExrateMidPrice(20200420T);
// 输出:7.0657
```
## `forExrateMidPriceBegTEndT(begt, endt)`
声明:function
返回区间汇率数据,与系统参数(外汇代码)相关
<!-- tags: 金融 外汇 汇率 返回 获取 -->
| 参数 | 类型 | 说明 |
| ------ | --------- | ------------------ |
| `begt` | tdatetime | 日期类型,开始日期 |
| `endt` | tdatetime | 日期类型,截止日期 |
返回:array
### 示例
范例012020年4月20日到4月30日美元/人民币的中间价数据
```tsl
// 2020年4月20日到4月30日美元/人民币的中间价数据
SetSysParam(PN_Stock(), 'FXUSDCNY');
begt := 20200420T;
endt := 20200430T;
return ForExrateMidPriceBegTEndT(begt, endt);
```
## `forExRateZf(begt, endt)`
声明:function
获取汇率区间收益率,与系统参数(外汇代码)相关
<!-- tags: 金融 外汇 汇率 获取 查询 -->
| 参数 | 类型 | 说明 |
| ------ | --------- | ------------------ |
| `begt` | tdatetime | 日期类型,开始日期 |
| `endt` | tdatetime | 日期类型,截止日期 |
返回:real
### 示例
范例012020年4月20日到4月30日美元/人民币的收益率
```tsl
// 2020年4月20日到4月30日美元/人民币的收益率
SetSysParam(PN_Stock(), 'FXUSDCNY');
begt := 20200420T;
endt := 20200430T;
return ForExRateZf(BegT, EndT);
// 输出:-0.20786786956644
```
## `getCurrencyCodeBySecurityCode(stockid)`
声明:function
根据证券代码得到其币种代码。目前对照包括上交所、深交所、联交所股票
<!-- tags: 金融 外汇 汇率 获取 查询 -->
| 参数 | 类型 | 说明 |
| --------- | ------ | ---------------- |
| `stockid` | string | 字符串,证券代码 |
返回:real
### 示例
范例01:港股长和00001对应的货币对代码
```tsl
// 港股长和00001对应的货币对代码
return GetCurrencyCodeBySecurityCode('HK00001');
// 输出:HKD
```