# 股票 / 中央结算系统持股明细 ## `BK_CCASSCapitalInflowByParticipant(bkid, endt, ptype, ctype)` 声明:function 指定参与者资金流入。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | | `ctype` | any | 用户自定义。价格类型,取值如下: | 返回:float ## `BK_CCASSCapitalInflowByParticipant2(bkid, begt, endt, ptype, ctype)` 声明:function 区间指定参与者资金流入。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | | `ctype` | any | 用户自定义。价格类型,取值如下: | 返回:float ## `BK_CCASSMarketValueByParticipant(bkid, endt, ptype)` 声明:function 指定参与者持股市值。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | 返回:float ## `BK_CCASSMarketValueChangeByParticipant(bkid, begt, endt, ptype)` 声明:function 区间指定参与者持股市值变动。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | 返回:float ## `BK_CCASSMarketValueChangeByParticipant2(bkid, endt, ptype)` 声明:function 指定参与者持股市值变动。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | 返回:float ## `BK_CCASSMarketValueChangeGrowRatioByParticipant(bkid, begt, endt, ptype)` 声明:function 区间指定参与者持股市值变比(%)。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | 返回:float ## `BK_CCASSMarketValueChangeGrowRatioByParticipant2(bkid, endt, ptype)` 声明:function 指定参与者持股市值变比(%)。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `bkid` | string | 字符串。板块代码 | | `endt` | datetime | 日期。截止日 | | `ptype` | any | 用户自定义。参与者类型,取值如下: | 返回:float ## `stockCcassCapitalInflowByParticipant(ptype, ctype)` 声明:function 指定参与者资金流入,与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | | `ctype` | int | 用户自定义。价格类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(pn_date(),20230519T); return StockCCASSCapitalInflowByParticipant(1,0); ``` ## `stockCcassCapitalInflowByParticipant2(begt, endt, ptype, ctype)` 声明:function 区间指定参与者资金流入,与系统参数(证券代码)相关。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | | `ctype` | int | 用户自定义。价格类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSCapitalInflowByParticipant2(20230101T,20230519T,1,0); ``` ## `stockCcassCapitalInflowRatioByParticipant(ptype, ctype)` 声明:function 指定参与者资金流入占成交金额比(%),与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | | `ctype` | int | 用户自定义。价格类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(pn_date(),20230519T); return StockCCASSCapitalInflowRatioByParticipant(1,0); ``` ## `stockCcassCapitalInflowRatioByParticipant2(begt, endt, ptype, ctype)` 声明:function 区间指定参与者资金流入占成交金额比(%),与系统参数(证券代码)相关 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | | `ctype` | int | 用户自定义。价格类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSCapitalInflowRatioByParticipant2(20230101T,20230519T,1,0); ``` ## `stockCcassCodeChange(stock_id)` 声明:function 将股票代码转换成中央结算系统中可识别的港股代码。如股票代码错误或不支持或非中央结算系统中品种,则返回空字符串。 | 参数 | 类型 | 说明 | | ---------- | ------ | ---------------- | | `stock_id` | string | 字符串。股票代码 | 返回:string ## `stockCcassDataNorm(data)` 声明:function 整理中央结算系统持股明细数据,输出标准化数据。如数据中无相应字段,则返回空。 | 参数 | 类型 | 说明 | | ------ | ----- | -------------- | | `data` | array | 数组。持股明细 | 返回:array ## `stockCcassMarketValueByParticipant(ptype)` 声明:function 指定参与者持股市值,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"HK00001"); SetSysParam(PN_Date(),20220822T); return StockCCASSMarketValueByParticipant(1); ``` ## `stockCcassMarketValueChangeByParticipant(begt, endt, ptype)` 声明:function 区间指定参与者持股市值股变动,与系统参数(证券代码)相关。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSMarketValueChangeByParticipant(20230101T,20230519T,1); ``` ## `stockCcassMarketValueChangeByParticipant2(ptype)` 声明:function 指定参与者持股市值股变动,与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(PN_Date(),20230519T); return StockCCASSMarketValueChangeByParticipant2(1); ``` ## `stockCcassMarketValueChangeGrowRatioByParticipant(begt, endt, ptype)` 声明:function 区间指定参与者持股市值股变比(%),与系统参数(证券代码)相关。 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSMarketValueChangeGrowRatioByParticipant(20230101T,20230519T,1); ``` ## `stockCcassMarketValueChangeGrowRatioByParticipant2(ptype)` 声明:function 指定参与者持股市值股变比(%),与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(PN_Date(),20230519T); return StockCCASSMarketValueChangeGrowRatioByParticipant2(1); ``` ## `stockCcassParticipantDz()` 声明:function 参与者分类对照。 返回:array ## `stockCcassShareHolder(stock_id, endt)` 声明:function 获取指定日、指定港股,在中央结算系统中的持有人明细数据。 | 参数 | 类型 | 说明 | | ---------- | -------- | ---------------- | | `stock_id` | string | 字符串。股票代码 | | `endt` | datetime | 日期。截止日 | 返回:array ## `stockCcassVolByParticipant(ptype)` 声明:function 指定参与者持股数量,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"HK00001"); SetSysParam(PN_Date(),20220822T); return StockCCASSVolByParticipant(1); ``` ## `stockCcassVolChangeByParticipant(begt, endt, ptype)` 声明:function 区间指定参与者持股变动,与系统参数(证券代码)相关 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSVolChangeByParticipant(20230101T,20230519T,1); ``` ## `stockCcassVolChangeByParticipant2(ptype)` 声明:function 指定参与者持股变动,与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(pn_date(),20230519T); return StockCCASSVolChangeByParticipant2(1); ``` ## `stockCcassVolChangeGrowRatioByParticipant(begt, endt, ptype)` 声明:function 区间指定参与者持股变比(%),与系统参数(证券代码)相关 | 参数 | 类型 | 说明 | | ------- | -------- | --------------------------------- | | `begt` | datetime | 日期。开始日 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); return StockCCASSVolChangeGrowRatioByParticipant(20230101T,20230519T,1); ``` ## `stockCcassVolChangeGrowRatioByParticipant2(ptype)` 声明:function 指定参与者持股变比(%),与系统参数(证券代码、时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(pn_date(),20230519T); return StockCCASSVolChangeGrowRatioByParticipant2(1); ``` ## `stockCcassVolRatioByParticipant(ptype)` 声明:function 指定参与者持股数量占A股比(%),与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ------- | ---- | --------------------------------- | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SH600585"); SetSysParam(PN_Date(),20230519T); return StockCCASSVolRatioByParticipant(1); ``` ## `stockCcshdGetDataEndT(stock_id, end_t, sid)` 声明:function 获取指定日的中央结算系统交易明细数据。 1、如果日期大于等于今天,则取上一个交易日; 2、获取指定日期的最近港股交易日。 | 参数 | 类型 | 说明 | | ---------- | -------- | ---------------- | | `stock_id` | string | 字符串。证券代码 | | `end_t` | datetime | 日期。截止日期 | | `sid` | string | 字符串。股东代码 | 返回:array ## `stockCcshdGetDataEndT2(stock_id, end_t, ptype)` 声明:function 获取指定日的中央结算系统股东分类的股数。 1、如果日期大于等于今天,则取上一个交易日; 2、获取指定日期的最近港股交易日。 | 参数 | 类型 | 说明 | | ---------- | -------- | --------------------------------- | | `stock_id` | string | 字符串。证券代码 | | `end_t` | datetime | 日期。截止日期 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float ## `stockCcshdNoNName(n)` 声明:function 第N股东名称,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:string ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNName(3); ``` ## `stockCcshdNoNStockId(n)` 声明:function 第N股东代码,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:string ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNStockID(3); ``` ## `stockCcshdNoNVol(n)` 声明:function 第N股东持股数量,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNVol(3); ``` ## `stockCcshdNoNVolGrow(n)` 声明:function 第N股东持股数量变动,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNVolGrow(3); ``` ## `stockCcshdNoNVolPercent(n)` 声明:function 第N股东持股占总股本比(%),与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNVolPercent(3); ``` ## `stockCcshdNoNVolPercentGrow(n)` 声明:function 第N股东持股占总股本变比(%),与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,第N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDNoNVolPercentGrow(3); ``` ## `stockCcshdStockVol(sid)` 声明:function 指定股东持股数量,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ----- | ------ | --------------- | | `sid` | string | 字符串,股东代码 | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"HK00001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDStockVol("C00019"); ``` ## `stockCcshdStockVolGrow(sid)` 声明:function 指定股东持股数量变动,与系统参数(证券代码,时间)相关 其中港股无总股本相关数据,则返回0 | 参数 | 类型 | 说明 | | ----- | ------ | --------------- | | `sid` | string | 字符串,股东代码 | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDStockVolGrow("C00019"); ``` ## `stockCcshdStockVolPercent(sid)` 声明:function 指定股东持股占总股本比(%),与系统参数(证券代码,时间)相关 其中港股无总股本相关数据,则返回0 | 参数 | 类型 | 说明 | | ----- | ------ | --------------- | | `sid` | string | 字符串,股东代码 | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDStockVolPercent("C00019"); ``` ## `stockCcshdStockVolPercentGrow(sid)` 声明:function 指定股东持股占总股本变比(%),与系统参数(证券代码,时间)相关 其中港股无总股本相关数据,则返回0 | 参数 | 类型 | 说明 | | ----- | ------ | --------------- | | `sid` | string | 字符串,股东代码 | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDStockVolPercentGrow("C00019"); ``` ## `stockCcshdTopNVol(n)` 声明:function 前N股东持股数量,与系统参数(证券代码,时间)相关 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,前N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDTopNVol(10); ``` ## `stockCcshdTopNVolGrow(n)` 声明:function 前N股东持股数量变动,与系统参数(证券代码,时间)相关 港股无总股本数据,则返回0 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,前N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDTopNVolGrow(10); ``` ## `stockCcshdTopNVolPercent(n)` 声明:function 前N股东持股占总股本比(%),与系统参数(证券代码,时间)相关 港股无总股本数据,则返回0 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,前N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDTopNVolPercent(10); ``` ## `stockCcshdTopNVolPercentGrow(n)` 声明:function 前N股东持股占总股本变比(%),与系统参数(证券代码,时间)相关 港股无总股本数据,则返回0 | 参数 | 类型 | 说明 | | ---- | ---- | -------- | | `n` | int | 整型,前N | 返回:float ### 示例 ```tsl SetSysParam(pn_stock(),"SZ000001"); SetSysParam(PN_Date(),20220822T); return StockCCSHDTopNVolPercentGrow(10); ``` ## `stockCcshDtradeday(n)` 声明:function 获取指定日最近有数据的日期,与系统参数(时间)相关。 | 参数 | 类型 | 说明 | | ---- | ---- | ----------------- | | `n` | int | 整数。前N个交易日 | 返回:float ### 示例 ```tsl SetSysParam(pn_date(),20220813T); return StockCCSHDtradeday(0); ``` ## `stocksCcassMarketValueByParticipant(stockarr, endt, ptype)` 声明:function 指定参与者持股市值。 | 参数 | 类型 | 说明 | | ---------- | -------- | --------------------------------- | | `stockarr` | array | 数组。股票列表 | | `endt` | datetime | 日期。截止日 | | `ptype` | int | 用户自定义。参与者类型,取值如下: | 返回:float