Rsponse every 1 second using AdxRtList

Hello ,

I am seeking to create a Winform Application with Eikon API, and here is how I am retrieving data :

l_temp = m_adxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);


is there any way to retrieve data every 1 second instead of streaming on every update ?


Cheers.

Best Answer

  • Alex Putkov.1
    Alex Putkov.1 ✭✭✭✭✭
    Answer ✓

    Yes, this is possible. You need to change 3 things in your code:

    1. Set
      m_AdxRtList.Mode = "FRQ:1S";
      Here the value of the "FRQ" keyword is the frequency with which you want the OnTime event to be raised.
    2. Instead of calling m_AdxRtList.StartUpdates(RT_RunMode.RT_MODE_ONUPDATE), call m_AdxRtList.StartUpdates(RT_RunMode.RT_MODE_ONTIME) or m_AdxRtList.StartUpdates(RT_RunMode.RT_MODE_ONTIME_IF_UPDATED).
    3. Replace the callback for OnUpdate event with the callback for OnTime event.

    Alternatively you could simply remove the callback for OnUpdate event and create your own timer to grab the values from m_AdxRtList object. The ListFields method you use to extract market data from m_AdxRtList object can be used outside of any event callbacks.