feat(tsl-api-reference): expand API and module coverage

This commit is contained in:
csh
2026-08-14 17:12:55 +08:00
parent 8f1056130d
commit 3d3036ebe1
571 changed files with 47842 additions and 14458 deletions
@@ -242,6 +242,27 @@ setStockBuyInfo("SZ000002", 'BuyPrice', 8);
return getSysParam('BuyPrice');
```
## `stockBuyPrice()`
声明:function
返回当前证券环境中 BuyPrice 系统变量保存的买入价格
<!-- tags: 金融 金融工程 Dev 买入价格 BuyPrice 系统变量 交易策略 -->
返回:real
### 示例
范例01:读取万科 A 的买入价格
```tsl
setStockBuyInfo("SZ000002", "BuyPrice", 5.5);
setSysParam(pn_stock(), "SZ000002");
return stockBuyPrice();
// 输出:5.5
```
## `setStockBuyTime(id, time)`
声明:function
@@ -266,6 +287,27 @@ setStockBuyTime('SZ000002', intToDate(20121023));
return getSysParam("BuyTime");
```
## `stockBuyTime()`
声明:function
返回当前证券环境中 BuyTime 系统变量保存的买入时间
<!-- tags: 金融 金融工程 Dev 买入时间 BuyTime 系统变量 交易策略 -->
返回:t_date_time
### 示例
范例01:读取万科 A 的买入时间
```tsl
setStockBuyInfo("SZ000002", "BuyTime", 20121023T);
setSysParam(pn_stock(), "SZ000002");
return stockBuyTime();
// 输出:41205
```
## `stockBuyDiff()`
声明:function