[Eikon Data API - Streaming Prices - Python] Cannot receive streaming prices via API, error: Rece...

...ive 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
Best Answer
-
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.
0
Answers
-
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.
According to the error message, it could be the problem on the Eikon or Refinitiv workspace processes.
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.
0 -
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.0 -
@Christiano
I contacted the internal team to check this issue.
I will keep you posted after getting responses from that team.
0 -
The product team found that the problem may relate to the WebSocket server that Eikon is connecting to.
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.
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>
0 -
@Jirapongse
1) Proceeding as described, on C:\ProgramData\Thomson Reuters\Eikon Data\Logs\DumpedSAPURL.xml, the tag aforementioned is highlighted below: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:
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.0 -
3) It also worths note that on the System Test, I had the following errors (that maybe linked to the main issue):
0 -
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛