Error going from desktop.workspace to platform.deployed
Hello,
I am using the Refinitiv Data Api. I have no issue running the following script on my machine (when Eikon Desktop is running)
import refinitiv.data as rd
rd.open_session('desktop.workspace')
rd.get_data(
universe=['USDSROISTNZ=R'],
fields=['PRIMACT_1']
)
I get a dataframe of the data that I am looking for, so all good.
When I try to run the following
rd.open_session('platform.deployed')
rd.get_data(
universe=['USDSROISTNZ=R'],
fields=['PRIMACT_1']
)
the code gets stuck and it does not give me any output or error, simply gets stuck (probably in an endless loop).
This is are the components of the refinitiv-data.config.json file. I am using the same app key (It's an Eikon Data API key). Url and Dacs are coming from the market data team in my company
"desktop": {
"workspace": {
"app-key": "#### APP KEY ####"
}
}
"deployed": {
"app-key": "#### APP KEY ####",
"realtime-distribution-system": {
"url" : " xxx.xx.xxx.x:xxxxx",
"dacs" : {
"username" : "xxxxxx",
"application-id" : xxx,
"position" : ""
}
}
}
Any idea what is happening?
Best Answer
-
I notice a space in your URL
ws:// xxx.xx.xxx.x:15000/WebSocket
If there is a space in your json file, please try removing it
ws://xxx.xx.xxx.x:15000/WebSocket
1
Answers
-
Hi @lucio.fiorin,
The 'platform.deployed' specification refers to sessions that connect directly to your own deployed streaming service. The 'deployed' configuration does not require an 'app-key'. If you are attempting to connect to your own deployed streaming service and want to get prices, you will need to utilize the pricing interfaces:
Example.DataLibrary.Python/Examples/1-Access/EX-1.01.03-PricingStream.ipynb at main · Refinitiv-API-Samples/Example.DataLibrary.Python · GitHub
Example.DataLibrary.Python/Examples/2-Content/2.02-Pricing/EX-2.02.03-Pricing-StreamingCache.ipynb at main · Refinitiv-API-Samples/Example.DataLibrary.Python · GitHub0 -
Hi,
Agree, the space was causing problems. Now it is able to connect.
I am trying the following code as suggested:
stream = rd.open_pricing_stream(
universe=['USDSROISTNZ=R'],
fields=['PRIMACT_1'],
on_data=display_data
)
but I get the following error(s)
[2023-06-22T17:22:42.786412+01:00] - [sessions.platform.deployed.0] - [DEBUG] - [36172 - ThreadOMMSTREAMING_PRICING_0.0] - [stream_connection] - [_on_message] - [OMMSTREAMING_PRICING_0.0] on_ws_message [{"ID": 5, "Type": "Status", "Key": {"Name": "USDSROISTNZ=R"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "AlreadyOpen", "Text": "Request Rejected: Request key did not contain service Id."}}]
0 -
As your organisation's real-time servers probably have more than one service being published (and no default specified), you will need to specify the service you wish to consume data from
stream = rd.open_pricing_stream(
universe=['GBP=', 'EUR=', 'JPY='],
fields=['BID', 'ASK'],
service='ELEKTRON_DD',
on_data=display_data
)Please check with your Market Data team that ELEKTRON_DD is indeed the correct service name to use.
0 -
@lucio.fiorin
Also, check your dacs id also does not have a leading space...
0 -
Hello,
I am using the exact same specification suggested by the market data team, not sure how they can get a result running the same script then.
I was able to add the logs, I get the following error (I redacted the realtime distribution system url
[2023-06-22T16:53:55.979009+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] try to reconnect over url ws:// xxx.xx.xxx.x:15000/WebSocket
[2023-06-22T16:53:55.980009+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] wait start connecting
[2023-06-22T16:53:55.980009+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] is connecting
[2023-06-22T16:53:55.982009+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] connect
num_attempt : 3
url : ws:// xx.xx.xxx.x:15000/WebSocket
headers : ['User-Agent: Python']
cookies : None
transport : websocket
subprotocols: ['tr_json2']
[2023-06-22T16:53:55.983012+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] on_ws_error: Exception: [Errno 11001] getaddrinfo failed
[2023-06-22T16:53:55.983012+01:00] - [DEBUG] - [sessions.platform.deployed.0] - [7636] | ThreadOMMSTREAMING_PRICING_0.0
[OMMSTREAMING_PRICING_0.0] on_ws_close: close_status_code=None, close_msg=None, state=StreamCxnState.Connecting0 -
Can you confirm there is no space in your actual IP? Appears to be there again:
url : ws:// xx.xx.xxx.x:15000/WebSocket
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 中文论坛