Files
QTradeProgram/include/Proto/Trd_GetPositionList.proto
2025-08-15 15:57:31 +08:00

40 lines
1.7 KiB
Protocol Buffer
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto2";
package Trd_GetPositionList;
option java_package = "com.futu.openapi.pb";
option go_package = "github.com/futuopen/ftapi4go/pb/trdgetpositionlist";
import "Common.proto";
import "Trd_Common.proto";
message C2S
{
required Trd_Common.TrdHeader header = 1; //交易公共参数头
optional Trd_Common.TrdFilterConditions filterConditions = 2; //过滤条件
optional double filterPLRatioMin = 3; //过滤盈亏百分比下限高于此比例的会返回比如传10.0返回盈亏比例大于10%的持仓
optional double filterPLRatioMax = 4; //过滤盈亏百分比上限低于此比例的会返回比如传20.0返回盈亏比例小于20%的持仓
optional bool refreshCache = 5; //立即刷新OpenD缓存的此数据默认不填。true向服务器获取最新数据更新缓存并返回flase或没填则返回OpenD缓存的数据不会向服务器请求。
//正常情况下服务器有更新就会立即推送到OpenDOpenD缓存着数据API请求过来返回同步的缓存数据一般不需要指定刷新缓存保证快速返回且减少对服务器的压力
//如果遇到丢包等情况,可能出现缓存数据与服务器不一致,用户如果发现数据更新有异样,可指定刷新缓存,解决数据同步的问题。
}
message S2C
{
required Trd_Common.TrdHeader header = 1; //交易公共参数头
repeated Trd_Common.Position positionList = 2; //持仓列表
}
message Request
{
required C2S c2s = 1;
}
message Response
{
//以下3个字段每条协议都有注释说明在InitConnect.proto中
required int32 retType = 1 [default = -400];
optional string retMsg = 2;
optional int32 errCode = 3;
optional S2C s2c = 4;
}