syntax = "proto2";
package Qot_GetOptionUnderlyingHisVolatility;
option java_package = "com.futu.openapi.pb";

import "Common.proto";
import "Qot_Common.proto";
import "Qot_OptionCommon.proto";

//逐日波动率数据
message VolatilityItem
{
    required string time = 1; //交易日时间字符串
    optional double timestamp = 2; //交易日时间戳
    optional double iv = 3; //隐含波动率（该字段为百分比字段，默认不展示%，如20实际对应20%）
    optional double hv = 4; //历史波动率（该字段为百分比字段，默认不展示%，如20实际对应20%）
    optional double underlyingPrice = 5; //标的收盘价（当日为标记价）
}

message C2S
{
    required Qot_Common.Security owner = 1; //期权标的股
    optional int32 indexOptionType = 2; //Qot_Common.IndexOptionType，指数期权的类型，仅用于恒指国指
    required string beginTime = 3; //开始时间字符串
    required string endTime = 4; //结束时间字符串
    optional bytes nextPageKey = 5; //分页请求的key，如果不是翻页请求，不需要填
}

message S2C
{
    required Qot_Common.Security owner = 1; //期权标的股
    optional string code = 2; //股票代码
    optional string name = 3; //股票名称
    repeated VolatilityItem volatilityList = 4; //波动率数据列表，按交易日降序排列
    optional bytes nextPageKey = 5; //分页请求的key，如果还有更多数据，会返回此字段
}

message Request
{
    required C2S c2s = 1;
}

message Response
{
    required int32 retType = 1 [default = -400]; //RetType，返回结果
    optional string retMsg = 2;
    optional int32 errCode = 3;
    optional S2C s2c = 4;
}
