New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
3 1 1 4

[Eikon Data API - Streaming Prices - Python] Cannot receive streaming prices via API, error: Receive status message for unknown subscription

1) Main issue: When using Eikon Data API for Python, there is an issue on receiving streaming data with a python script as simple as:

import eikon as ek

ek.set_app_key("xxxxx")
ek.set_log_level(1)


def on_update(item, fields, status, error):
    print(f"Item: {item}, Fields: {fields}")

stream = ek.StreamingPrices(instruments=['BRL='], 
                            fields=['CF_BID', 'CF_ASK'], 
                            on_update=on_update)

stream.open()

image (1).png

2) Actions tried:

- Enabling debug log on Configuration Manager: points that it is most likely to be a communication bug with the api proxy locally:
image (2).png

- System check: everything is ok, except for private network (which is not used).

- Using refinitiv.data module instead of eikon module: same error as before.

- Using Refinitiv Eikon Datastream add on for Excel: after logged in, the only functions displayed are the ones for charts. In addition, my account is not subscribed to Datastream Web Services.

- Tried to use the same Eikon version, and other version on different computers, with different operational systems: same error as before.

- Search for similar issues: https://community.developers.refinitiv.com/questions/107081/streamingprices-unknown-subscription.html, but is does not point to a solution to follow.

- Refinitiv Support: they said that they do not handle functionalities related to Eikon API, and have adviced to post a question in this developers forum.

3) In conclusion, I need to stream FX prices (bid and ask). I rather not use get_data because of api limits. Could you help me with this api issue in order to use StreamingPrices for python properly?

4) Versions:

Eikon: 4.0.63
Python: 3.7.2
Operational System: Windows Server 2012 R2

#technology#productpython apistreaming-prices
image-1.png (8.7 KiB)
image-2.png (94.2 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.

Upvote
Accepted
87.8k 294 53 79

@Christiano

Thank you for the updating.

I have forwarded your information to the product team. I have also created a new case to the Eikon support team to verify what the problem is because this issue is out of the API scope.

The support team will contact you directly. I am not sure if clearing Eikon cache can help because it looks like the API proxy still gets an invalid hostname.


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.

To close this issue, the Refinitiv support team has contacted my team directly, and the problem was solved. It appeared to be a disruption with the API service and it might has caused a global issue, which is now mitigated and working fine.
Upvotes
87.8k 294 53 79

@Christiano

Thank you for reaching out to us.

I tested the code and checked the log. The log showed that the Eikon or Refinitiv Workspace can establish a WebSocket connection to the server properly.

1695704221737.png

According to the error message, it could be the problem on the Eikon or Refinitiv workspace processes.

1695702083173.png

The Eikon or Refinitiv Workspace may not be able to establish a WebSocket connection to the server. Please kindly contact the Eikon or Refinitiv Workspace support team via MyRefinitiv to verify what the problem is.


1695704221737.png (95.1 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
3 1 1 4

Hi @Jirapongse, thank you for helping. Unfortunately, as I said before, the Refinitiv Support has told me they do not handle functionalities related to Eikon API, and have adviced to post a question in this developers forum. I will provide an update below related to my issue, that was discovered after my question was posted.

[Issue Update]

1) It was found that using Eikon's Codebook, a GUI in the software for Jupyter Notebook provided by the software itself, the StreamingPrices method works fine. Checking the versions:

Python: 3.8.15, packaged by conda-forge (gcc 10.4.0)
Numpy module: 1.22.4
Pandas module: 1.3.5
Eikon module: 1.1.16

2) Testing on a virtual environment on the command prompt, I have used the following versions:

Python: 3.8.1, pip
Numpy module: 1.22.4
Pandas module: 1.3.5
Eikon module: 1.1.16

Same error occurs.

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.

@Christiano

I contacted the internal team to check this issue.

I will keep you posted after getting responses from that team.

Upvotes
87.8k 294 53 79

@Christiano

The product team found that the problem may relate to the WebSocket server that Eikon is connecting to.

1695972155481.png

The correct one should be amers2.

They would like to see the Eikon Configuration at startup. You can enable it via the Refinitiv Eikon - Configuration Manager.

1695972243376.png

After restarting Eikon, the DumpedSAPURL.xml file will be created in the C:\ProgramData\Thomson Reuters\Eikon Data\Logs folder. Look for the <SAP sap="streamingweb.cp." ..> key to see the address that Eikon is using.

For example:

<SAP sap="streamingweb.cp." hosted="true" trusted="true" prefix="" address="apac1-ws-hmds.platform.refinitiv.com">apac1-ws-hmds.platform.refinitiv.com</SAP>

1695972155481.png (62.2 KiB)
1695972243376.png (30.4 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.

@Jirapongse

1) Proceeding as described, on C:\ProgramData\Thomson Reuters\Eikon Data\Logs\DumpedSAPURL.xml, the tag aforementioned is highlighted below:

image-3.png

Note that even though it is configured for amers2, the API Proxy logs as amers1. I have noticed the following part in that log, it might indicate something:

image (6).png

The CpUrlService url conversion could be the problem somehow.

2) After that, I tried to change the region from amer1 to amer2 at C:\Program Files (x86)\Thomson Reuters\Eikon\X\Config\CountryDataCenter.xml and C:\Program Files (x86)\Thomson Reuters\Eikon\Z\Config\CountryDataCenter.xml. However, modifying that and restarting the application did not change the websocket url to amers2.

image-6.png (107.5 KiB)
image-3.png (212.8 KiB)
Upvotes
3 1 1 4

3) It also worths note that on the System Test, I had the following errors (that maybe linked to the main issue):

image (4).png


image-4.png (359.5 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.

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.