How to handle MsgSecNum (tag 34) while requesting market data

Created at 19 Sep 2019, 11:19
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
WI

wiktor.kisielewski

Joined 10.09.2019

How to handle MsgSecNum (tag 34) while requesting market data
19 Sep 2019, 11:19


Hello again,

Im looking for a way to menage MsgSecNum (tag 34) while requesting market data in a loop.

Im sending 35=V message and im reciving 35=W response exactly as expected, but it happens only once.

I wish to loop market data reguest every  X miliseconds, and the only problem is tag 34 (it should increase every time it loops i guess). Of course I could add "1" to the prev MsgSecNum every time loop repeats itself, yet I have a feeling that this is not the best way to do it. After a long conection the value of MsgSecNum will be huge.

Should I reset MsgSecNum sometimes, if so then how often?

Maybe I should make a new connection every X loops?

Or maybe there is some smart way to do it?

 

Thanks in advance,

Wiktor


@wiktor.kisielewski
Replies

PanagiotisCharalampous
19 Sep 2019, 11:31

Hi Wiktor,

You can reset the sequence number whenever you want using 35=4. Check the documentation.

Best Regards,

Panagiotis


@PanagiotisCharalampous