Files
QTradeProgram/include/Proto/Qot_SetPriceReminder.proto

57 lines
2.7 KiB
Protocol Buffer
Raw Normal View History

2025-08-15 15:57:31 +08:00
syntax = "proto2";
package Qot_SetPriceReminder;
option java_package = "com.futu.openapi.pb";
option go_package = "github.com/futuopen/ftapi4go/pb/qotsetpricereminder";
import "Common.proto";
import "Qot_Common.proto";
enum SetPriceReminderOp
{
SetPriceReminderOp_Unknown = 0;
SetPriceReminderOp_Add = 1; //新增
SetPriceReminderOp_Del = 2; //删除
SetPriceReminderOp_Enable = 3; //启用
SetPriceReminderOp_Disable = 4; //禁用
SetPriceReminderOp_Modify = 5; //修改
SetPriceReminderOp_DelAll = 6; //删除该支股票下所有到价提醒
}
message C2S
{
required Qot_Common.Security security = 1; // 股票
required int32 op = 2; // SetPriceReminderOp操作类型
optional int64 key = 3; // 到价提醒的标识GetPriceReminder协议可获得用于指定要操作的到价提醒项对于新增的情况不需要填
optional int32 type = 4; // Qot_Common::PriceReminderType提醒类型删除、启用、禁用的情况下会忽略该字段
optional int32 freq = 7; // Qot_Common::PriceReminderFreq提醒频率类型删除、启用、禁用的情况下会忽略该字段
optional double value = 5; // 提醒值,删除、启用、禁用的情况下会忽略该字段(精确到小数点后 3 位,超出部分会被舍弃)
optional string note = 6; // 用户设置到价提醒时的标注,仅支持 20 个以内的中文字符,删除、启用、禁用的情况下会忽略该字段
}
//注意:
//1. API 中成交量设置统一以股为单位。但是牛牛客户端中A 股是以为手为单位展示
//2. 到价提醒类型,存在最小精度,如下:
// TURNOVER_UP成交额最小精度为 10 元人民币元港元美元。传入的数值会自动向下取整到最小精度的整数倍。如果设置【00700成交额102元提醒】设置后会得到【00700成交额100元提醒】如果设置【00700 成交额 8 元提醒】设置后会得到【00700 成交额 0 元提醒】
// VOLUME_UPA 股成交量最小精度为 1000 股,其他市场股票成交量最小精度为 10 股期权成交量最小精度为0.001张。传入的数值会自动向下取整到最小精度的整数倍。
// BID_VOL_UP、ASK_VOL_UPA 股的买一卖一量最小精度为 100 股。传入的数值会自动向下取整到最小精度的整数倍。
// 其余到价提醒类型精度支持到小数点后 3 位
message S2C
{
required int64 key = 1; //设置成功的情况下返回对应的key不成功返回0
}
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;
}