question

Upvotes
Accepted
42 4 4 6

How to get real time data for a few currencies with AdxRtList simultaneously?

Hello! I am writing application on C#. To get real time data for one currency I writing this:

AdxRtList.Source = "IDN";
            AdxRtList.RegisterItems("GPB=", "BID");
            AdxRtList.StartUpdates(RT_RunMode.RT_MODE_ONUPDATE);

and this

void adxRtList_OnUpdate(string a_itemName, object a_userTag, RT_ItemStatus a_itemStatus)
        {
            //use item name to get the data
            object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);
            object[,] l_fields = (object[,])Convert.ChangeType(temp, typeof(object[,]));
            label5.Text = a_itemName + ": " + l_fields[0, 1];


            AdxRtList.StopUpdates();
        }

But I need to get data for 30 currencies, how can I do it? I tried to write

AdxRtList.RegisterItems("GPB=, AUD=, RUB=", "BID");

but it doesn't work.

eikonrefinitiv-realtimeeikon-com-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
42 4 4 6

I found solution - simple array =)

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @aidynchik_84, you are correct! We would support a variant or a param array both for the list of instruments or the list of fields.

Hi @zhenyakovalyov

Tell me please when I can stop AdxRtList updates? I need to launch AdxRtList only once, and then I need to stop it. But I can't do that on adxRtList_OnUpdate, because I don't know how many currencies did I get

I wrote as you said

AdxRtList.StartUpdates(RT_RunMode.RT_MODE_IMAGE);
....
void adxRtList_OnImage(RT_DataStatus a_itemStatus)
        {
            //use item name to get the data
            string a_itemName = "";
            object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);

now I'm getting an error {"ERROR #360f - AdxRtList : invalid item "} on

object temp = AdxRtList.get_ListFields(a_itemName, RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);

according to your code, a_itemName is an empty string, it should be a RIC, for instance:

object temp = AdxRtList.get_ListFields("RUB=", RT_FieldRowView.RT_FRV_ALL, RT_FieldColumnView.RT_FCV_VALUE);

oh, thank you very much! It works!

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.