I'm using the ETA api to get market price update (level 1). I'm wondering, if I'm only interested in RSSL_MC_REFRESH message, and want to receive it every 15 minutes, how can I do that?
@jerrymao You can issue a snapshot request, instead of streaming request, which will result in getting the image response only. This will require that your application request a new snapshot periodically - 15 mins.
@Gurpreet Can this be automated by the code? i.e. setup a timer, and send a request for snapshot every 15 mins?
Yes, timer just as any other event can be used to trigger a request for snapshot.
I see, I will take a look. Thanks for the help!
@Gurpreet I didn't find where and how can I setup a timer for the snapshot request, can you point me to the right place?
Thanks!
@jerrymao The timer is not the part of API. You will have to create a timer and handle timer event, to request a snapshot.
You can use system timers from OS for this. In Windows or Linux timer_create() and timer_settime() to arm/disarm the timers, or you can use third party library like Boost to create cross platform timers.
In the timer callback, encode and send the MarketPrice snapshot request.