124 lines
2.7 KiB
Protocol Buffer
124 lines
2.7 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
option java_multiple_files = true;
|
|
option java_package = "io.grpc.example.market_data";
|
|
|
|
option java_outer_classname = "market_data";
|
|
option objc_class_prefix = "HLW";
|
|
|
|
package market_data;
|
|
|
|
service TestService {
|
|
rpc GetData1(CThostFtdcDepthMarketDataField) returns(MsgReply) {}
|
|
rpc GetData2(ResMsg) returns(MsgReply) {}
|
|
}
|
|
|
|
message CThostFtdcDepthMarketDataField {
|
|
// 交易日
|
|
string TradingDay = 1;
|
|
// 保留的无效字段
|
|
string reserve1 = 2;
|
|
// 交易所代码
|
|
string ExchangeID = 3;
|
|
// 保留的无效字段
|
|
string reserve2 = 4;
|
|
// 最新价
|
|
double LastPrice = 5;
|
|
// 上次结算价
|
|
double PreSettlementPrice = 6;
|
|
// 昨收盘
|
|
double PreClosePrice = 7;
|
|
// 昨持仓量
|
|
double PreOpenInterest = 8;
|
|
// 今开盘
|
|
double OpenPrice = 9;
|
|
// 最高价
|
|
double HighestPrice = 10;
|
|
// 最低价
|
|
double LowestPrice = 11;
|
|
// 数量
|
|
int32 Volume = 12;
|
|
// 成交金额
|
|
double Turnover = 13;
|
|
// 持仓量
|
|
double OpenInterest = 14;
|
|
// 今收盘
|
|
double ClosePrice = 15;
|
|
// 本次结算价
|
|
double SettlementPrice = 16;
|
|
// 涨停板价
|
|
double UpperLimitPrice = 17;
|
|
// 跌停板价
|
|
double LowerLimitPrice = 18;
|
|
// 昨虚实度
|
|
double PreDelta = 19;
|
|
// 今虚实度
|
|
double CurrDelta = 20;
|
|
// 最后修改时间
|
|
string UpdateTime = 21;
|
|
// 最后修改毫秒
|
|
int32 UpdateMillisec = 22;
|
|
// 申买价一
|
|
double BidPrice1 = 23;
|
|
// 申买量一
|
|
int32 BidVolume1 = 24;
|
|
// 申卖价一
|
|
double AskPrice1 = 25;
|
|
// 申卖量一
|
|
int32 AskVolume1 = 26;
|
|
// 申买价二
|
|
double BidPrice2 = 27;
|
|
// 申买量二
|
|
int32 BidVolume2 = 28;
|
|
// 申卖价二
|
|
double AskPrice2 = 29;
|
|
// 申卖量二
|
|
int32 AskVolume2 = 30;
|
|
// 申买价三
|
|
double BidPrice3 = 31;
|
|
// 申买量三
|
|
int32 BidVolume3 = 32;
|
|
// 申卖价三
|
|
double AskPrice3 = 33;
|
|
// 申卖量三
|
|
int32 AskVolume3 = 34;
|
|
// 申买价四
|
|
double BidPrice4 = 35;
|
|
// 申买量四
|
|
int32 BidVolume4 = 36;
|
|
// 申卖价四
|
|
double AskPrice4 = 37;
|
|
// 申卖量四
|
|
int32 AskVolume4 = 38;
|
|
// 申买价五
|
|
double BidPrice5 = 39;
|
|
// 申买量五
|
|
int32 BidVolume5 = 40;
|
|
// 申卖价五
|
|
double AskPrice5 = 41;
|
|
// 申卖量五
|
|
int32 AskVolume5 = 42;
|
|
// 当日均价
|
|
double AveragePrice = 43;
|
|
// 业务日期
|
|
string ActionDay = 44;
|
|
// 合约代码
|
|
string InstrumentID = 45;
|
|
// 合约在交易所的代码
|
|
string ExchangeInstID = 46;
|
|
}
|
|
|
|
message ResMsg {
|
|
string signame = 1;
|
|
string InstrumentID = 2;
|
|
int32 sigflag = 3;
|
|
double sigvalue = 4;
|
|
string offset = 5; // char 替换为 string
|
|
string dir = 6; // char 替换为 string
|
|
int32 vol = 7;
|
|
repeated double other_params = 8;
|
|
repeated string other_msg = 9;
|
|
}
|
|
|
|
message MsgReply { string message = 1; }
|