How to get access to your .net API and retrieve real time data?

Hi there,

I'm trying out your .Net API (nuget package). I'm wondering how to await the callback onDataReceived function? I have the nuget package from your tutorial and trying out your example.

What are the requirements to retrieve the values?

Do i need to have Eikon desktop app running on my machine?

Thanks in advance

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @0c62b574-a087-4b69-8ba8-1f3ad682f116

    Yes, you are correct. When using Eikon APIs, Eikon must be installed and run on the machine. Eikon APIs communicate to Eikon processes in order to get the data. I assumed that you are using .NET APIs for use in custom applications. On the Overview page, it states that:

    APIs in this SDK have a run time dependency on Eikon and require that Eikon application is running with the user signed on to be able to retrieve data from Eikon. If Eikon application is not running, it can be automatically launched by this SDK.

Answers

  • What about if i don't have the Eikon running on my machine? I believe we can launch it by its SDK like that:

    private static IDataServices Services { get; set; }

    private static void InitializeDataServices(string appName)

    {

    Services = DataServices.Instance;

    Services.StateChanged += ServicesOnStateChanged;

    Services.Initialize(appName);

    }

    Right?

    If that is correct, then what should i do to get the values? I'm using the example from your tutorial.

    Thanks

  • That is the example i'm using:

    Usage Example Realtime Data API

    But still this method cannot it is not being called

    private void DataReceived(SingleFieldValue value)

    Could you please advise?

  • Please enable the debug log by adding the following configurations to the app.config file.

    image

    config.txt

  • @0c62b574-a087-4b69-8ba8-1f3ad682f116 it is a desktop api, so naturally you will have to run eikon desktop

  • Thanks for your reply.

    Just added the lines but still i get the error attached.

    image

  • @0c62b574-a087-4b69-8ba8-1f3ad682f116

    The errors in your screenshot are normal and expected when you launch the example while Eikon is not running. The code in the example tries to establish real-time data subscription without waiting for data services to be fully initialized. The latter takes a few seconds unless Eikon is already running, hence the timeouts for the real-time data subscription. However what you should see in the output after these errors is messages saying that connection initialization succeeded, UDA service is up and running, a bunch of channels have been created and finally you should see real-time data subscription returning values. I gather none of that is happening for you, right? Does the screenshot you included show the end of the output from the example? In other words could you confirm that for you the example produces no output after the error messages in the screenshot, and it just hangs? Could you also please confirm that you're trying the example without any modifications to the code, and that you installed Eikon .NET SDK by restoring the Nuget package the example is referencing?
    What happens to Eikon when you run the example? Does it get launched? If yes, are you able to retrieve real-time data into Eikon after it gets launched?
    What happens if you start Eikon first and then run the example after Eikon has launched?

  • Hi,

    Yes it's still hanging with no data received.

    image

    Also please find attached the references of the example (example used as downloaded with no modifications). Is there something missing?

    Looking forward to hearing from you.

    Thanks

  • @0c62b574-a087-4b69-8ba8-1f3ad682f116 could you please confirm which id you are using to login to Eikon?

  • It would also be very helpful to get the answers to all other questions I asked in my previous response.

  • Hello @0c62b574-a087-4b69-8ba8-1f3ad682f116

    Does the problem still persist in your environment? If so, please give us information that has been asked above.