Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
21 0 2 0

Eikon Python API - ticks received once every 3 sec instead of few ticks in a second

Hello. I am trying to retrieve current prices using the Python example you provided, but getting responds every 3 sec, while in the Eikon I see few ticks every sec.


import eikon as ek

from datetime import datetime



def display_fields(streaming_prices, instrument_name, fields):

print(datetime.now(), " Fields received for", instrument_name, ":", fields)



if __name__ == "__main__":

print("Starting")

ek.set_app_key('xxx)

print("Connected")


streaming = ek.StreamingPrices(

instruments=['EUR='],

service = 'IDN_RDFNTS_CF',

fields=['SALTIM', 'CF_BID', 'CF_ASK', 'OPEN_PRC', 'CF_HIGH', 'CF_LOW', 'CF_CLOSE'],

on_refresh=lambda streaming_prices, instrument_name, fields:

display_fields(streaming_prices, instrument_name, fields),

on_update=lambda streaming_prices, instrument_name, fields:

display_fields(streaming_prices, instrument_name, fields)

)

streaming.open()


while True:

if streaming.state != "Open":

streaming.open()


streaming.close()

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-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.

Upvotes
Accepted
21 0 2 0

Thank you @Umer Nalla for your assistance. After the issue was reviewed by Eikon Technical team, the cause was identified, addressed, and fixed by the Refinitiv Development team and will be released globally soon with Eikon API Proxy version 1.1.0.91.

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.

Upvotes
25.3k 87 12 25

Hi @oleg.lipshits

The code you are using looks fine, if I use the same code I get updates approx 2-3 times a second e.g.

2020-06-04 10:53:00.439994  Fields received for EUR= : {'CF_BID': 1.1198, 'CF_ASK': 1.1199} 2020-06-04 10:53:00.715981  Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12} 2020-06-04 10:53:01.060276  Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:01.324176  Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.1199} 2020-06-04 10:53:01.612824  Fields received for EUR= : {'CF_BID': 1.1198, 'CF_ASK': 1.1199} 2020-06-04 10:53:01.950824  Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.1201} 2020-06-04 10:53:02.371836  Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:02.691826  Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:02.981823  Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12} 2020-06-04 10:53:04.062825  Fields received for EUR= : {'CF_BID': 1.1197, 'CF_ASK': 1.12} 2020-06-04 10:53:04.641828  Fields received for EUR= : {'CF_BID': 1.1196, 'CF_ASK': 1.12}

All I can assume is that your local Eikon install is conflating locally perhaps?

Does the same happen if run in a Jupyter Notebook vs standalone .py script?

I have reached out to some Eikon experts as well - in case they can shed some light on this.


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.

Upvotes
21 0 2 0

"All I can assume is that your local Eikon install is conflating locally perhaps? "

Can you elaborate?

Can it be some Eikon API preferences?

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.

Upvotes
25.3k 87 12 25

Hi @oleg.lipshits

Sometimes users are connected to an internal TREP for the realtime data - this seemed unlikely given the service name but I wanted to check. A colleague has checked and you are using a hosted connection (i.e. internet) so that is not the case.

As another test, can you please remove all the following block of code

streaming.open()
while True:
    if streaming.state != "Open":
        streaming.open()
streaming.close()

and replace with the following code:

streaming.open()
asyncio.get_event_loop().run_until_complete(asyncio.sleep(180))
streaming.close()

you will, of course, need to import asyncio

If that does not help - just for testing purposes, please try the following changes to your StreamingPrice request and see if you get more frequent updates?:

...
    instruments=['EUR='],
    service = 'IDN_RDF',
    fields=['BID', 'ASK'],
....

Please report back with the results of both the above tests so we can try and assist further.

If both the above changes make no difference to the outcome, please upload a txt file containing the console output from the script for a few minutes of runtime.

Thanks.

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.

Upvotes
21 0 2 0

Hello. We tried both your sugestions and was unable to resolve the issue. Please see attached files with the results.

asyncio.txt

changed_params.txt


asyncio.txt (2.5 KiB)
changed-params.txt (1.7 KiB)
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.

Upvotes
25.3k 87 12 25

Hi @oleg.lipshits

Thanks for trying the alternatives.

Given that your issue does not appear to be an API functionality/coding type issue - I have opened a ticket for you with our helpdesk so it can be investigated by the Eikon Technical support team. They will be able to investigate this offline and help resolve the issue you are facing.

The ticket number is 08794823 - if you need to chase this ticket up please visit My Refinitiv and login/create an account using your corporate email address.

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.

This issue has already been addressed and fixed Eikon APIProxy version 1.1.0.91 which will be released globally soon.

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.