# 金融 / 期权 / 活跃成交持仓 / 中间函数 ## `optionUBCQK(option_id, end_t, otype, data_type, top_n)` 声明:function 返回最活跃和持仓最大标的券合约情况 | 参数 | 类型 | 说明 | | ----------- | ----------- | -------------------------------- | | `option_id` | string | 字符串。期权代码 | | `end_t` | t_date_time | 日期。截止日期 | | `otype` | integer | 整数。期权类型(0:认沽,1:认购) | | `data_type` | integer | 整数。数据类型(0:交易,1:持仓) | | `top_n` | integer | 整数。前N | 返回:array ### 示例 范例01:调用 OptionUBCQK ```tsl return OptionUBCQK("SH510050", 20200807T, 0, 0, 3); ``` ## `optionubcqkperiod(option_id, beg_t, end_t, option_type, data_type, top_n)` 声明:function 返回日期区间内最活跃或持仓量最大的期权机构排名数据 | 参数 | 类型 | 说明 | | ------------- | -------- | -------------------------------- | | `option_id` | string | 期权标的代码 | | `beg_t` | datetime | 开始日期 | | `end_t` | datetime | 截止日期 | | `option_type` | integer | 期权类型,0 为认沽,1 为认购 | | `data_type` | integer | 排名数据类型,0 为交易,1 为持仓 | | `top_n` | integer | 返回前 N 名机构 | 返回:array ### 示例 范例01:查询区间内认沽期权交易量前三名机构 ```tsl return optionubcqkperiod("SH510050", 20200801T, 20200807T, 0, 0, 3); ```