Impossible to use streaming prices
Hi everyone,
I tried executing the code from your GitHub.
It returned me an error, that I can't solve and neither the Eikon HelpDesk :
"2022-03-30 14:42:52,669 P[61668] [WebSocket 0 177212] Receive status message for unknown subscription id 4"
The id is changing based on the RICs I put in but nothing seems to work.
I then wanted to do things properly and tried following your tutorial here.
I checked the prerequisites and did them : everything went fine !
Then my error came back again for the streaming_prices part.
My eikon Data API is in 1.1.14, so I should be good on this side.
I checked all the prerequisites of the libraries : appdirs, certifi, chardet, datetime, deprecation, h2, httpx, idna, nest-asyncio, numpy, pandas, python-dateutil, requests, rfc3986, websocket-client, and nothing seemed off.
And most importantely, everything is working fine on your CODEBOOK environment.
Is there anything that I'm missing ?
Best regards,
Theo
Answers
-
Hi @theo.px ,
Without more detail, and especially without log file, it isn' t obvious to find a cause.
You should search for log related to subscription id 4 (initial open request, status, error and/or refresh response, ...)
If you installed and updated eikon lib with different version, you can reinstall with "pip install --upgrade --force-reinstall eikon" to be sure that you have all dependencies with the right version.
0 -
I don't know where to find the logs, here is my code :
import eikon as ek
import datetime
ek.set_app_key('XXX')
streaming_prices = ek.StreamingPrices(
instruments = ['GBP=','JPY=', 'CAD='],
fields = ['CF_BID','CF_ASK','OPEN_PRC', 'CF_HIGH','CF_LOW', 'CF_CLOSE']
)
streaming_prices.open()
df = streaming_prices.get_snapshot(
instruments = ['JPY=', 'CAD='],
fields = ['CF_BID','CF_ASK']
)
print(df)What more do you need ?
The code is sending me the ID4 message at line 15.
PS : I can't seem to be able to upload any image I've got a "Parsing response failed" error
0 -
You can activate debug traces with this way:
ek.set_app_key('XXX')
ek.set_log_level(1)
...Then, you'll have a pyeikon.yyyymmdd.hh-mm-ss.log file in same directory than your script. You should also have traces in your console window.
One possibility that could cause your issue: for some rics, subscription can switch to delayed (ex: subscription to "EUR=" => switched to "/EUR=" ).
Currently, Python API doesn't support this.
1 -
I can't upload files either.
Here is the logs :
[2022-03-30 17:21:34,109;s] - [Level 1] - [log] - StreamingPrices : open streaming on ['GBP=', 'JPY=', 'CAD=']
[2022-03-30 17:21:34,110;s] - [DEBUG] - [log] - Open asynchronously StreamingSinglePrice 2 to JPY=
[2022-03-30 17:21:34,110;s] - [DEBUG] - [log] - Open asynchronously ItemStream 2 to JPY=
[2022-03-30 17:21:34,110;s] - [Level 1] - [log] - Create StreamConnection...
[2022-03-30 17:21:34,110;s] - [Level 1] - [log] - Register streaming session 1
[2022-03-30 17:21:34,112;s] - [Level 1] - [log] - Streaming session 1 waits for start event
[2022-03-30 17:21:34,112;s] - [DEBUG] - [log] - Streaming is started
[2022-03-30 17:21:34,329;s] - [Level 1] - [log] - WAIT FOR LOGIN EVENT
[2022-03-30 17:21:34,329;s] - [Level 1] - [log] - Streaming session 1 received start event, then open websocket.
[2022-03-30 17:21:34,332;s] - [Level 1] - [log] - WebSocket for streaming session 1 was opened to server: ws://127.0.0.1:9060/api/v1/data/streaming/pricing/WebSocket
[2022-03-30 17:21:34,332;s] - [Level 1] - [log] - Send request: {'ID': 4, 'Domain': 'Login', 'Key': {'Name': 'john doe', 'Elements': {'AppKey': 'XXX', 'ApplicationId': '256', 'Position': 'XXX'}}}
[2022-03-30 17:21:34,388;s] - [DEBUG] - [log] - Receive message from Web Socket
[2022-03-30 17:21:34,388;s] - [TRACE] - [log] - Receive message for login 4: {'ID': 4, 'State': {'Code': 'ConnectionError', 'Data': 'Suspect', 'Stream': 'Closed', 'Text': 'Cannot establish connection to the platform'}, 'Type': 'Status'}
[2022-03-30 17:21:34,388;s] - [INFO] - [log] - Received status message:
{'Code': 'ConnectionError', 'Data': 'Suspect', 'Stream': 'Closed', 'Text': 'Cannot establish connection to the platform'}
[2022-03-30 17:21:34,388;s] - [WARNING] - [log] - Receive status message for unknown subscription id 40 -
This log explains the reason why the web socket can't be opened:
Receive message for login 4: {'ID': 4, 'State': {'Code': 'ConnectionError', 'Data': 'Suspect', 'Stream': 'Closed', 'Text': 'Cannot establish connection to the platform'}, 'Type': 'Status'}
This status message is returned by the Eikon Desktop Proxy.
If you activate debug logs in Eikon Configuration Manager then explore Log folder (it should be C:\ProgramData\Thomson Reuters\Eikon Data\Logs but to be sure, open it from Eikon Configuration Manager application) and check APIProxy.yymmdd.hhmmssmmm.p<pid>.txt file in \TRD\Eikon.yyyymmdd.hhmmss.pXXXXX subfolder.
You should fin message related to /api/rdp/streaming/pricing/v1/WebSocket.
On my side (without error):[2022-03-23 15:36:56.445|1|data-api|1|INFO] [WebSocketServer]Creating new WebSocket server instance
[2022-03-23 15:36:56.448|1|data-api|3|DEBUG] [WebSocketServer]WebSocket path is /api/rdp/streaming/pricing/v1/WebSocket. Max simultaneous connections: 10
[2022-03-23 15:36:56.451|1|data-api|1|INFO] [ApiV1WebSocketServerProvider]Creating new WebSocket server instance
[2022-03-23 15:36:56.454|1|data-api|3|DEBUG] [ApiV1WebSocketServerProvider]WebSocket path is /api/v1/data/streaming/pricing/WebSocket. Max simultaneous connections: 101 -
Hello,
So I launched the Eikon Configuration Manager application (in edition mode),I activated the logs by ticking the "Configure Logs on the Workstation" box. I then clicked on "Open logs folder" and in \TRD\Eikon.yyyymmdd.hhmmss.pXXXXX subfolders I don't have any log files that looks like APIProxy.yymmdd.hhmmssmmm.p<pid>.txt . So I opened the Logs viewer in the Eikon Configuration Manager application and the only log appearing (every 20s) is
10:09:25 Condition 'Configuration:RDE_SSO_CONNECTION_STATUS' == 'ONLINE' is false
10:09:25 Device 'PROFILE-UPLOAD' does not upload its data because condition is falseI don't know if it has to do with the API !
Thank you in advance for your help
0 -
No it's not ! But I promise I'll put the answer as Accepted for the next person who has this problem.
1 -
I didn't catch you're using Refinitiv Workspace !
The log file you should check is node-sxs.yyyymmdd.pXXXX.log, but it'll be less easy because it contains traces from SXS and APIPROXY.Search messages related to APIPROXY and WebSocketServer.
These messages are related to local web sockets available for python clients:...
2022-03-31T06:18:48.633Z|info|[console](app) create APIPROXY
...
2022-03-31T06:18:48.699Z|info|[console](api) [WebSocketServer]Creating new WebSocket server instance
2022-03-31T06:18:48.699Z|info|[console](api) [WebSocketServer]WebSocket path is /api/rdp/streaming/pricing/v1/WebSocket. Max simultaneous connections: 10
2022-03-31T06:18:48.699Z|info|[console](api) [ApiV1WebSocketServerProvider]Creating new WebSocket server instance
2022-03-31T06:18:48.699Z|info|[console](api) [ApiV1WebSocketServerProvider]WebSocket path is /api/v1/data/streaming/pricing/WebSocket. Max simultaneous connections: 10
2022-03-31T06:18:48.699Z|info|[console](api) [WebSocketProxyServersProviderImpl]Creating new WebSocket server instance
2022-03-31T06:18:48.699Z|info|[console](api) [WebSocketProxyServersProviderImpl]WebSocket path is /api/rdp/streaming/trading-analytics/trade-data/beta1/redi/WebSocket. Max simultaneous connections: 10
...If there is error with the web socket between this APIPROXY and the platform, it should be logged.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛