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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 0 1

Opening of Data stream does not work anymore

Hi everyone,

I have been trying to get started on recovering live data from Eikon.

In order to do this, after I have tried replicating the code provided on the Refinitiv website concerning the live-streaming. (https://developers.refinitiv.com/eikon-apis/eikon-data-api/learning?content=81721&type=learning_material_item)

After a few trials of opening and closing the price stream (which by the way did not return anything...), it now seems that the opening/closing of the stream does not work anymore at all.

Is there a way to troubleshoot the connection in order to know where the problem is coming from?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonstreaming-pricesstreaming-datatroubleshooting
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.

Upvote
Accepted
18k 21 12 20

Hi @adrien.weihs

Are you on Eikon free trial?

I think it may be related.

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.

Hi,

I am indeed... I was wondering whether or not this was having an influence on the connection, but I was not able to source this information. Is there a way to confirm it so that I can be in touch with the sales representative?

Hi @adrien.weihs

I think realtime streaming information that you tried to subscribe to is fee-liable so you may not be able to subscribe to that data.

Can you try some FX RIC such as EUR= ?

I do not know if it is going to work but from my understanding, FX RIC is non-fee liable.

I think for account permission, it is better to contact the sales representative.

Hi,

As you can see from the script, I have already tried the field "EUR ="... I also just retried with a single field "CF_LAST": still no success.

Could you please confirm that the connection works/or not, independently of the RIC, with a trial version?

Upvotes
20.3k 73 10 20

Hi @adrien.weihs

Can you expand on what you mean when you say:

  • After a few trials of opening and closing the price stream (which by the way did not return anything...) - if it did not return anything how did you confirm the open/close was working?
  • opening/closing of the stream does not work anymore at all - please expand how this differs from the earlier statement.

you can also try and set the log level e.g.

import logging.config
....
....
ek.set_log_level(logging.DEBUG)
ek.set_app_key('your app key')

and share the output (after removing the application ID, access token etc)


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.


Dear Umer,

Thank you for the prompt answer. Please find the output attached above (would this be the optimal way of sharing it with you?)

Concerning the questions:

'if it did not return anything how did you confirm the open/close was working?' - What I meant to say is that although nothing was returned, my Python script was able to end/run both .open() and .close() statements. (I assume that if nothing changes while the stream is open, nothing is returned... why it did not work for me is another issue ;) )

'please expand how this differs from the earlier statement.' - Now, I don't get to the .close() statement anymore, as if it got stuck in the .open() function somewhere.






ouput.png (78.3 KiB)
Upvotes
20.3k 73 10 20

Hi @adrien.weihs

I saw a reply which stated that it was working for some instruments and not others. However, the post is not appearing on here. So, I am guessing it is more a case of it works sometimes and not others regardless of the instrument - is this correct?

I can see from the log output that there is a disconnect occuring between the library and the Eikon instance. It would appear that the internal Websocket server on the Eikon instance disconnected your python app. Can you confirm if Eikon is working and running correctly?

Also, just to be sure that you uninstalled any previous version of the Eikon python library before installed the EAP 1.1.2b0 in PyPi version?

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.

Indeed, I tried multiple combinations of instruments and it did not really seem to matter..


As you said, I noticed the connection error as well... Eikon is running well as far as I can see: is there maybe something to check there?


And yes, I did uninstall Eikon (prior to installing 1.1.2b0).

Upvotes
4.3k 2 4 5

Hi,

Could you share all the script you are running without any personal Id and pwd, then it'll be easier to analyze and understand what is your issue.

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.

Hi @pierre.faurel, please find the script attached. It is mostly the code found on the refinitiv website anyways... :) (I could not attach the .py file)


script.txt


script.txt (1.8 KiB)

Please also look at the output I attached above (not the same instruments, but same error : [WebSocket 0 96160] Unlock login_event for streaming session 1 due to disconnect event )

Upvotes
4.3k 2 4 5

Thanks for the script.

I run it with both eikon 1.1.2b0 and 1.1.2b1 version, and I don't reproduce your issue:

2020-01-29 11:48:06,640 P[9936] [MainThread 14596] Checking port 9000 response : 500 - {"code":500,"message":"Cannot find module \".\"","statusMessage":"Internal Server Error"}
2020-01-29 11:48:06,640 P[9936] [MainThread 14596] Port 9000 was retrieved from .portInUse file
2020-01-29 11:48:06,640 P[9936] [MainThread 14596] Try to handshake on url http://localhost:9000/api/handshake...
2020-01-29 11:48:07,815 P[9936] [MainThread 14596] Response : 200 - {"access_token":"xxxxxxxxxxx","expires_in":1209600,"token_type":"bearer"}
2020-01-29 11:48:07,815 P[9936] [MainThread 14596] Application ID: xxxxxxxxxx
2020-01-29 11:48:07,815 P[9936] [MainThread 14596] Port 9000 on local proxy was detected
2020-01-29 11:48:07,816 P[9936] [MainThread 14596] Open asynchronously StreamingSinglePrice 1 to EUR=
2020-01-29 11:48:07,816 P[9936] [MainThread 14596] Open asynchronously ItemStream 1 to EUR=
2020-01-29 11:48:07,816 P[9936] [MainThread 14596] Streaming is started
2020-01-29 11:48:09,248 P[9936] [WebSocket 0 30056] Receive message from Web Socket
2020-01-29 11:48:09,249 P[9936] [WebSocket 0 30056] Received login response for id 1 different than login id 2
2020-01-29 11:48:09,249 P[9936] [WebSocket 0 30056] Login to websocket successful
2020-01-29 11:48:09,249 P[9936] [WebSocket 0 30056] Unlock login event due to login response
2020-01-29 11:48:09,249 P[9936] [MainThread 14596] Open asynchronously Stream 1
2020-01-29 11:48:09,249 P[9936] [MainThread 14596] Subscribe to EUR= on ['SALTIM', 'CF_BID', 'CF_ASK', 'OPEN_PRC', 'CF_HIGH', 'CF_LOW', 'CF_CLOSE', 'CF_VOLUME', 'CF_LAST']
2020-01-29 11:48:09,378 P[9936] [WebSocket 0 30056] Receive message from Web Socket
11:48:09.378176 - Status received for EUR= : {'status': , 'code': 'Open', 'message': 'All is well'}
11:48:09.378176 - Refresh received for EUR= : {'CF_BID': 1.1001, 'CF_ASK': 1.1003, 'OPEN_PRC': 1.1021, 'CF_HIGH': 1.1027, 'CF_LOW': 1.0995, 'CF_CLOSE': 1.102, 'CF_VOLUME': 30034, 'CF_LAST': 1.1001}
11:48:09.378176 - StreamingPrice is complete. Full snapshot:
  Instrument  CF_BID  CF_ASK  OPEN_PRC  CF_HIGH  CF_LOW  CF_CLOSE  CF_VOLUME  CF_LAST
0       EUR=  1.1001  1.1003    1.1021   1.1027  1.0995     1.102      30034   1.1001
2020-01-29 11:48:09,392 P[9936] [MainThread 14596] Stop StreamingSinglePrice subscription 1 to EUR=
2020-01-29 11:48:09,392 P[9936] [MainThread 14596] Close ItemStream subscription 1
2020-01-29 11:48:09,392 P[9936] [MainThread 14596] Close Stream subscription 1

Process finished with exit code 0


I suspect your Eikon product wasn't upgrade to the right version OR you loose credentials to use Eikon API.
That'll explain following trace:
[WebSocket 0 71796] Unlock login_event for streaming session 1 due to disconnect event
[MainThread 96900] Streaming failed to start

Could detail your Eikon APPS versions ?
To find this, open Help > About Thomson Reuters Eikon window, then click on COPY TO CLIPBOARD, paste result in your response and remove all except "* * Apps * *" section.
Ex:

* * Apps * *
- APPS (ACTIVE)
	ABOUTDIALOG (40.27.18.3)
		THOMSONREUTERS.EIKON.ABOUTDIALOG (40.27.18.3)
		Installed on 2019-07-05 15:59:40.507
	ALERTS (1.0.6.0)
		TR.ALERTS (1.0.6.0)
		Installed on 2019-09-27 16:30:44.049
	ALERTSENGINE (1.0.0.23)
		THOMSONREUTERS.EIKON.ALERTSENGINE (1.0.0.23)
		Installed on 2019-09-27 16:30:42.260
        ...
	WEBAPPS_DEV (9.51.0.79)
		THOMSONREUTERS.EIKON.WEBAPPS_DEV (9.51.0.79)
		Installed on 2020-01-28 17:16:17.414
	WEBINTEGRATION (9.51.0.79)
		THOMSONREUTERS.EIKON.WEBINTEGRATION (9.51.0.79)
		Installed on 2020-01-28 17:16:17.425
	WPFREALTIME (10.0.0.106)
		WPFREALTIME (10.0.0.106)
		Installed on 2019-09-27 16:30:54.412


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.

Hi @pierre.faurel, Thanks for looking into the issue.


I am not sure to understand what you mean by ' you loose credentials to use Eikon API. ' but please find attached the app versions.


app versions.txt

app-versions.txt (3.3 KiB)
Upvotes
4.3k 2 4 5

I don't see obvious root cause to your issue.

Let me suggest to clean your Python site-packages directory by deleting manually all subdirectories starting with eikon (sometimes, there is mismatch between different previous versions)

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