For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 1 0 0

Facing time delay when send a first request to call Eikon Data API?

Hi,

I noticed that if I send a 1st request (with API key), it takes a bit longer than when I send a subsequent request. I presume there is some delay in authentication initially. In order to improve user experience, should I send a dummy request maybe when a user starts filling inputs so that their requests are processed a bit faster?

Please provide the suggested way?

Thank You,

Priya

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvotes
Accepted
23k 22 9 14

Hello @priyanka,

Personally, I would not send any dummy requests for the purpose of speed up or to improve user experience.

The session is initiated once, then multiple requests are issued.

The user knows when they have started the app, so it is not unexpected for them.

Different requests also can take unequal amount of time, so this will not guarantee all requests very quick.

Plus this request will count toward EIKON DATA API USAGE AND LIMITS so if, for some reason, the user decides to rapidly restart the app repeatedly, dummy requests can potentially be generated on every restart and that can lead to hitting limits, which would be obviously undesirable.

Depending on what you run and what you observe, it may be additionally useful to test, if the startup of Eikon session from Eikon Data API is the only initialization happening and contributing to the perceived delay. Sometimes environments, such as Jupiter notebook, also introduce some additional overhead, so running "naked" python command line may be a clean test, and may allow you to better understand the full nature of the delay.


icon clock
10 |1500

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

Upvotes
20.3k 73 10 20

Hi @priyanka

when you say 'I send a 1st request (with API key) ' - I assume that means when you call set_app_key('appkey') ?

This call is a not a 'request' as such - the set_app_key() call is to establish a connection/session from your Python script with the locally running instance of Eikon. Therefore, yes the set_app_key call will take a moment whilst the connection/session is established.

Once the session is established, the time taken for the response to other calls such as get_data etc will depend on the type of request as explained by my colleague Zoya above.

In this regards, you can call set_app_key early on in your script e.g. at startup, so the connection is ready for when the user starts requesting data via the inputs.

icon clock
10 |1500

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

Click below to post an Idea Post Idea