@@ -186,6 +186,22 @@ func (d *EDecoder) interpret(msgBytes []byte) {
186186 d .processMarketRuleMsgProtoBuf (msgBuf )
187187 case USER_INFO :
188188 d .processUserInfoMsgProtoBuf (msgBuf )
189+ case NEXT_VALID_ID :
190+ d .processNextValidIdMsgProtoBuf (msgBuf )
191+ case CURRENT_TIME :
192+ d .processCurrentTimeMsgProtoBuf (msgBuf )
193+ case CURRENT_TIME_IN_MILLIS :
194+ d .processCurrentTimeInMillisMsgProtoBuf (msgBuf )
195+ case VERIFY_MESSAGE_API :
196+ d .processVerifyMessageApiMsgProtoBuf (msgBuf )
197+ case VERIFY_COMPLETED :
198+ d .processVerifyCompletedMsgProtoBuf (msgBuf )
199+ case DISPLAY_GROUP_LIST :
200+ d .processDisplayGroupListMsgProtoBuf (msgBuf )
201+ case DISPLAY_GROUP_UPDATED :
202+ d .processDisplayGroupUpdatedMsgProtoBuf (msgBuf )
203+ case MKT_DEPTH_EXCHANGES :
204+ d .processMktDepthExchangesMsgProtoBuf (msgBuf )
189205 default :
190206 d .wrapper .Error (msgID , currentTimeMillis (), UNKNOWN_ID .Code , UNKNOWN_ID .Msg , "" )
191207 }
@@ -1219,6 +1235,24 @@ func (d *EDecoder) processNextValidIdMsg(msgBuf *MsgBuffer) {
12191235 d .wrapper .NextValidID (reqID )
12201236}
12211237
1238+ func (d * EDecoder ) processNextValidIdMsgProtoBuf (msgBuf * MsgBuffer ) {
1239+
1240+ var protoMsg protobuf.NextValidId
1241+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
1242+ log .Error ().Err (err ).Msg ("failed to unmarshal NextValidId" )
1243+ return
1244+ }
1245+
1246+ d .wrapper .NextValidIdProtoBuf (& protoMsg )
1247+
1248+ id := NO_VALID_ID
1249+ if protoMsg .OrderId != nil {
1250+ id = int64 (protoMsg .GetOrderId ())
1251+ }
1252+
1253+ d .wrapper .NextValidID (id )
1254+ }
1255+
12221256func (d * EDecoder ) processContractDataMsg (msgBuf * MsgBuffer ) {
12231257
12241258 var version int64 = 8
@@ -2031,6 +2065,24 @@ func (d *EDecoder) processCurrentTimeMsg(msgBuf *MsgBuffer) {
20312065 d .wrapper .CurrentTime (t )
20322066}
20332067
2068+ func (d * EDecoder ) processCurrentTimeMsgProtoBuf (msgBuf * MsgBuffer ) {
2069+
2070+ var protoMsg protobuf.CurrentTime
2071+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
2072+ log .Error ().Err (err ).Msg ("failed to unmarshal CurrentTime" )
2073+ return
2074+ }
2075+
2076+ d .wrapper .CurrentTimeProtoBuf (& protoMsg )
2077+
2078+ ts := int64 (0 )
2079+ if protoMsg .CurrentTime != nil {
2080+ ts = protoMsg .GetCurrentTime ()
2081+ }
2082+
2083+ d .wrapper .CurrentTime (ts )
2084+ }
2085+
20342086func (d * EDecoder ) processRealTimeBarsMsg (msgBuf * MsgBuffer ) {
20352087
20362088 msgBuf .decode () // version
@@ -2546,6 +2598,24 @@ func (d *EDecoder) processVerifyMessageApiMsg(msgBuf *MsgBuffer) {
25462598 d .wrapper .VerifyMessageAPI (apiData )
25472599}
25482600
2601+ func (d * EDecoder ) processVerifyMessageApiMsgProtoBuf (msgBuf * MsgBuffer ) {
2602+
2603+ var protoMsg protobuf.VerifyMessageApi
2604+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
2605+ log .Error ().Err (err ).Msg ("failed to unmarshal VerifyMessageApi" )
2606+ return
2607+ }
2608+
2609+ d .wrapper .VerifyMessageApiProtoBuf (& protoMsg )
2610+
2611+ data := ""
2612+ if protoMsg .ApiData != nil {
2613+ data = protoMsg .GetApiData ()
2614+ }
2615+
2616+ d .wrapper .VerifyMessageAPI (data )
2617+ }
2618+
25492619func (d * EDecoder ) processVerifyCompletedMsg (msgBuf * MsgBuffer ) {
25502620
25512621 msgBuf .decode () // version
@@ -2556,6 +2626,27 @@ func (d *EDecoder) processVerifyCompletedMsg(msgBuf *MsgBuffer) {
25562626 d .wrapper .VerifyCompleted (isSuccessful , errorText )
25572627}
25582628
2629+ func (d * EDecoder ) processVerifyCompletedMsgProtoBuf (msgBuf * MsgBuffer ) {
2630+
2631+ var protoMsg protobuf.VerifyCompleted
2632+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
2633+ log .Error ().Err (err ).Msg ("failed to unmarshal VerifyCompleted" )
2634+ return
2635+ }
2636+
2637+ d .wrapper .VerifyCompletedProtoBuf (& protoMsg )
2638+
2639+ ok := false
2640+ if protoMsg .IsSuccessful != nil {
2641+ ok = protoMsg .GetIsSuccessful ()
2642+ }
2643+ errText := ""
2644+ if protoMsg .ErrorText != nil {
2645+ errText = protoMsg .GetErrorText ()
2646+ }
2647+ d .wrapper .VerifyCompleted (ok , errText )
2648+ }
2649+
25592650func (d * EDecoder ) processDisplayGroupListMsg (msgBuf * MsgBuffer ) {
25602651
25612652 msgBuf .decode () // version
@@ -2566,6 +2657,28 @@ func (d *EDecoder) processDisplayGroupListMsg(msgBuf *MsgBuffer) {
25662657 d .wrapper .DisplayGroupList (reqID , groups )
25672658}
25682659
2660+ func (d * EDecoder ) processDisplayGroupListMsgProtoBuf (msgBuf * MsgBuffer ) {
2661+
2662+ var protoMsg protobuf.DisplayGroupList
2663+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
2664+ log .Error ().Err (err ).Msg ("failed to unmarshal DisplayGroupList" )
2665+ return
2666+ }
2667+
2668+ d .wrapper .DisplayGroupListProtoBuf (& protoMsg )
2669+
2670+ reqID := NO_VALID_ID
2671+ if protoMsg .ReqId != nil {
2672+ reqID = int64 (protoMsg .GetReqId ())
2673+ }
2674+ groups := ""
2675+ if protoMsg .Groups != nil {
2676+ groups = protoMsg .GetGroups ()
2677+ }
2678+
2679+ d .wrapper .DisplayGroupList (reqID , groups )
2680+ }
2681+
25692682func (d * EDecoder ) processDisplayGroupUpdatedMsg (msgBuf * MsgBuffer ) {
25702683
25712684 msgBuf .decode () // version
@@ -2576,6 +2689,28 @@ func (d *EDecoder) processDisplayGroupUpdatedMsg(msgBuf *MsgBuffer) {
25762689 d .wrapper .DisplayGroupUpdated (reqID , contractInfo )
25772690}
25782691
2692+ func (d * EDecoder ) processDisplayGroupUpdatedMsgProtoBuf (msgBuf * MsgBuffer ) {
2693+
2694+ var protoMsg protobuf.DisplayGroupUpdated
2695+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
2696+ log .Error ().Err (err ).Msg ("failed to unmarshal DisplayGroupUpdated" )
2697+ return
2698+ }
2699+
2700+ d .wrapper .DisplayGroupUpdatedProtoBuf (& protoMsg )
2701+
2702+ reqID := NO_VALID_ID
2703+ if protoMsg .ReqId != nil {
2704+ reqID = int64 (protoMsg .GetReqId ())
2705+ }
2706+ contractInfo := ""
2707+ if protoMsg .ContractInfo != nil {
2708+ contractInfo = protoMsg .GetContractInfo ()
2709+ }
2710+
2711+ d .wrapper .DisplayGroupUpdated (reqID , contractInfo )
2712+ }
2713+
25792714func (d * EDecoder ) processVerifyAndAuthMessageApiMsg (msgBuf * MsgBuffer ) {
25802715
25812716 msgBuf .decode () // version
@@ -3031,6 +3166,23 @@ func (d *EDecoder) processMktDepthExchangesMsg(msgBuf *MsgBuffer) {
30313166 d .wrapper .MktDepthExchanges (depthMktDataDescriptions )
30323167}
30333168
3169+ func (d * EDecoder ) processMktDepthExchangesMsgProtoBuf (msgBuf * MsgBuffer ) {
3170+
3171+ var protoMsg protobuf.MarketDepthExchanges
3172+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
3173+ log .Error ().Err (err ).Msg ("failed to unmarshal MarketDepthExchanges" )
3174+ return
3175+ }
3176+
3177+ d .wrapper .MarketDepthExchangesProtoBuf (& protoMsg )
3178+
3179+ descs := make ([]DepthMktDataDescription , 0 , len (protoMsg .GetDepthMarketDataDescriptions ()))
3180+ for _ , dd := range protoMsg .GetDepthMarketDataDescriptions () {
3181+ descs = append (descs , * decodeDepthMarketDataDescription (dd ))
3182+ }
3183+ d .wrapper .MktDepthExchanges (descs )
3184+ }
3185+
30343186func (d * EDecoder ) processTickNewsMsg (msgBuf * MsgBuffer ) {
30353187
30363188 tickerID := msgBuf .decodeInt64 ()
@@ -4237,6 +4389,24 @@ func (d *EDecoder) processCurrentTimeInMillisMsg(msgBuf *MsgBuffer) {
42374389 d .wrapper .CurrentTimeInMillis (timeInMillis )
42384390}
42394391
4392+ func (d * EDecoder ) processCurrentTimeInMillisMsgProtoBuf (msgBuf * MsgBuffer ) {
4393+
4394+ var protoMsg protobuf.CurrentTimeInMillis
4395+ if err := proto .Unmarshal (msgBuf .bs , & protoMsg ); err != nil {
4396+ log .Error ().Err (err ).Msg ("failed to unmarshal CurrentTimeMillis" )
4397+ return
4398+ }
4399+
4400+ d .wrapper .CurrentTimeInMillisProtoBuf (& protoMsg )
4401+
4402+ ms := int64 (0 )
4403+ if protoMsg .CurrentTimeInMillis != nil {
4404+ ms = protoMsg .GetCurrentTimeInMillis ()
4405+ }
4406+
4407+ d .wrapper .CurrentTimeInMillis (ms )
4408+ }
4409+
42404410//
42414411// Helpers
42424412//
0 commit comments