
syntax = "proto3";

package eagle;

// The eagle service definition.
service Eagle {
    // Unary - request and respond
    rpc HealthCheck (Ping) returns (Pong);
    rpc GetDataByStrategyId (GetDataByStrategyId_Msg) returns (GetDataByStrategyId_Reply);
    rpc GetBacktestWarmupData (GetBacktestWarmupData_Msg) returns (GetBacktestWarmupData_Reply);
    rpc GetUSLEIData (GetUSLEIData_Msg) returns (GetUSLEIData_Reply);
}

message GetBacktestWarmupData_Msg {
    string strategy_id = 1;
    string msg_id = 2;
    int32 msg_type = 3;
    int32 fid_num = 4;
}

message GetBacktestWarmupData_Reply {
    string data = 1;
}

message GetUSLEIData_Msg {
    int32 lookback_month = 1;
}
message GetUSLEIData_Reply {
    map<string, string> us_lei_data_map = 1;
}

message GetDataByStrategyId_Msg {
    string strategy_id = 1;
}

message GetDataByStrategyId_Reply {
    repeated string cfg = 1;
    repeated string ci = 2;
    string si = 3;
    string ord_snap = 4;
    string ord_hist = 5;
    string trd = 6;
    string price = 7;
}

message Ping {
    string message = 1;
}

message Pong {
    string message = 1;
}
