Get DataState/StreamState in Excel

While using RMDS API in C++ we can get information about StreamState and DataState (included in messages).

Is there any possibility to get analogical data in Excel while using some functions to retrieve real-time data? For example if I would like to retrieve BID and ASK for EUR/PLN=D2 using function RData.

In general we would like to know if data we receive via Excel is valid and have a tool for distinguish no market movement and some connections/data issues. Of course this tool should be fully automatic.

Best Answer

  • TR/RData functions have this functionality included. When state of the subscription changes, the spreadsheet function will return an error, e.g. #N/A Item Stale.

    As for the COM API (rtx.dll), there will be a state change event that you need to subscribe to, that will provide you with the current state (RT_ItemStatus). For more info, have a look at this tutorial.

    Here is a list of possible statuses:

     RT_ITEM_OK
    RT_ITEM_INVALID
    RT_ITEM_UNKNOWN
    RT_ITEM_STALE
    RT_ITEM_DELAYED
    RT_ITEM_NOT_PERMISSIONED