Multiple token subscription issue

I have been using CSharp sdk for Upstox API and trying to subscribe to multiple tokens( atleast 500 tokens). But when i am subscribing to multiple tokens in a single websocket request. i am getting a
protobuffer parsing error and when i am trying to subscribe to multiple tokens with multiple request(each request for each token), i got disconnected from websocket of upstox. Please help me.

Please keep the max count at 100 instruments at a time. We are internally discussing increasing the max count with the concerned team. We will inform you once we make progress on it.

var guid = Guid.NewGuid();

string subscribeMessage = “{"guid":"” + guid + “","method":"sub","data":{"mode":"full","instrumentKeys":["” + token + “"]}}”;

// Convert the string to binary using UTF-8 encoding
byte binaryData = Encoding.UTF8.GetBytes(subscribeMessage);

Task.Run(async () => await Send(binaryData));

Above is the code I have implemented to subscribe to tokens. Now could you please help me in which way i need to pass the tokens in above token variable. Below are the tokens i want to subscribe.

MCX_FO|426248
MCX_FO|425673
MCX_FO|425797
MCX_FO|426265
MCX_FO|426252
MCX_FO|259238
MCX_FO|259711
MCX_FO|260117
MCX_FO|260599
MCX_FO|260605
MCX_FO|425430
MCX_FO|259250
MCX_FO|260619
MCX_FO|426268
MCX_FO|260606
MCX_FO|426250
MCX_FO|256948
MCX_FO|257896
MCX_FO|426249
MCX_FO|426251
MCX_FO|425997
MCX_FO|260611
MCX_FO|259996
MCX_FO|260597
MCX_FO|260616
MCX_FO|426259
MCX_FO|256949
MCX_FO|259243
MCX_FO|259710
MCX_FO|258633
MCX_FO|260796
MCX_FO|253322
MCX_FO|425281
MCX_FO|260609
MCX_FO|425548
MCX_FO|257631
MCX_FO|260608
MCX_FO|255316
MCX_FO|260603
MCX_FO|256171
MCX_FO|260610
MCX_FO|426247
MCX_FO|425547
MCX_FO|426245
MCX_FO|260596
MCX_FO|259237
MCX_FO|426264
MCX_FO|260613
MCX_FO|254350
MCX_FO|260618
MCX_FO|426262
MCX_FO|259242
MCX_FO|259239
MCX_FO|260615
MCX_FO|426263
MCX_FO|426261
MCX_FO|260598
MCX_FO|256564
MCX_FO|426267
MCX_FO|260607
MCX_FO|258634
MCX_FO|260118
MCX_FO|258004
MCX_FO|426266
MCX_FO|260601
MCX_FO|426260
MCX_FO|260600
MCX_FO|259973
MCX_FO|254351
MCX_FO|252898
MCX_FO|260614
MCX_FO|260604
MCX_FO|258379
MCX_FO|426269
MCX_FO|259252
MCX_FO|258003
MCX_FO|426246
MCX_FO|425441
MCX_FO|260617
MCX_FO|425994
MCX_FO|425849
MCX_FO|259241
MCX_FO|260602
MCX_FO|260612
MCX_FO|260595
MCX_FO|260764
MCX_FO|426080
MCX_FO|258816
MCX_FO|254631
MCX_FO|257142
MCX_FO|260808
MCX_FO|426055
MCX_FO|258711
MCX_FO|426054
MCX_FO|256748
MCX_FO|425695
MCX_FO|426094
MCX_FO|255177
MCX_FO|257925
MCX_FO|425768
MCX_FO|256955
MCX_FO|425687
MCX_FO|260757
MCX_FO|425866
MCX_FO|253408
MCX_FO|254548
MCX_FO|426026
MCX_FO|257993
MCX_FO|426190
MCX_FO|425328
MCX_FO|260058
MCX_FO|425721
MCX_FO|254903
MCX_FO|425733
MCX_FO|260743
MCX_FO|255284
MCX_FO|425442
MCX_FO|426059
MCX_FO|425525
MCX_FO|256266
MCX_FO|258175
MCX_FO|253420
MCX_FO|425675
MCX_FO|260135
MCX_FO|256175
MCX_FO|425723
MCX_FO|425514
MCX_FO|256264
MCX_FO|253426
MCX_FO|260423
MCX_FO|258833
MCX_FO|426168
MCX_FO|425564
MCX_FO|259749
MCX_FO|258221
MCX_FO|425558
MCX_FO|425962
MCX_FO|260675
MCX_FO|259006
MCX_FO|255677
MCX_FO|425591

@Bharat_Dhiman

Please note that the instrumentKeys field requires an array of strings. When subscribing for updates, ensure to pass the necessary tokens as an array to this field.

Thank you!

MCX_FO|426248
MCX_FO|425673
MCX_FO|425797
MCX_FO|426265
MCX_FO|426252
MCX_FO|259238

Could you please place the above tokens to the below statement.

string subscribeMessage = “{“guid”:“” + guid + “”,“method”:“sub”,“data”:{“mode”:“full”,“instrumentKeys”:[“” + *** array of tokens*** + “”]}}”;

Because i tried many way to sort this out but not able to do so. If you could help me in placing the tokens in a right way then it might be helpful for me.

@Bharat_Dhiman

To assist you in building the string from your array of tokens, you can use the following code:

string[] tokens = new string[] { "MCX_FO|426248", "MCX_FO|425673", "MCX_FO|425797", "MCX_FO|426265", "MCX_FO|426252", "MCX_FO|259238" };
string tokenArrayString = string.Join("\",\"", tokens);

This should aid in progressing with your task. For further assistance, I recommend referring to online C# technical documentation, which could be quite helpful in overcoming any additional challenges.

Thank you!