may I ask if there is a python solution that does not use websockets, instead using the EMA librarie
I cannot use the websocket api to connect to the ADS server using managed feed user . Can you advise the possible reason ? The below setup is available for OneTick RFA OMM Collector, which is used to collect data from a Refinitiv source using the RFA OMM API
onetick@ny2-laa-011.analytics> python3 market_price.py --hostname 10.253.4.4 --port 14002 --position 10.31.145.219 --user AM3_MFSA_US06060
Connecting to WebSocket ws://10.253.4.4:14002/WebSocket ...
failed CONNECT via proxy status: 403
WebSocket Closed
script link
https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/python/market_price.py
We have advised that On Windows, there is no solution to use 14002 port because refinitiv-data Python library relies on the Websocket API protocol and therefore only manages websocket connection (default port 443).
For a RSSL connection (port 14002), the user will have to continue with EMA it it’s a question of performance (compare to RSSL connection, the websocket is slower and accept less simultaneous RIC subscriptions), the Python solution is probably not the right solution.
may I ask if there is a python solution that does not use websockets, instead using the EMA libraries?, or do we need to use a custom java app
Best Answer
-
Hello @LanceGabriel.Villacrusis
According to your "If you need to work with a websocket API, Python is a suitable choice.", the answer is not simply "Yes" or "No".
It is depending on the client requirements such as:- If the client needs the streaming data on the web, the browser's supported languages such as JavaScript or TypeScript is much more suitable than Python
- If the client needs performance, Python is obvious not a choice ("Python is a slow language").
- If the client needs to run an application on Windows platform, the .NET technology languages like C# is more suitable.
- etc.
Actually, if the client concerns about a performance, either Python or WebSocket API are not a choice for them.
The WebSocket API Tutorials choose to give developers detail via Python because it is one of the easiest to understand language.
The WebSocket (and the JSON message) connection is designed for supporting multiple languages, support an open-standard technology, easy to parse data. On the other hand, the RSSL connection is designed for highly distribution data application. It is the backbone of our LSEG Real-Time platform, so the EMA has a better performance than any languages on the WebSocket API.
I hope this information helps.
0
Answers
-
EMA SDK is only available in Java, C++ and .NET. Python will have to use Websocket API. The port 14002 is an RSSL port and cannot be used with Python. Websockets typically run on port 15000 and have to be enabled in ADS first.
0 -
So In summary:
Python and Websockets:
- Python supports websockets through libraries like
websockets
orwebsockets-client
. - If you need to work with a websocket API, Python is a suitable choice.
- Python supports websockets through libraries like
EMA Library and Python Compatibility:
- The EMA (Elektron Message API) library is primarily designed for Java, C++ and .NET.
- Unfortunately, there isn’t a direct Python implementation of the EMA library.
- If you specifically need EMA features, you’ll need to use the following Java, C++ and .NET
Custom Java Application:
- To leverage EMA features and interact with a websocket API, create a custom Java application.
- Your Java app can handle both EMA connectivity and websocket communication.
Kindly correct me if im wrong or if I have missed anything
0 -
Only websockets-client module is supported in provided samples.
If an app uses EMA, it can directly consume data from RSSL connection and does not need to use websockets. RSSL offers better performance compared to WS.
0 -
@wasin.w and @Gurpreet Thank you so much for your insights, would appreciate if you could validate and approve my summary:
Summary:
1.Python and Websockets:
-Python supports websockets through libraries like websockets or websockets-client.
-If you need to work with a websocket API using Python there are a few things to reconsider:
It depends on your requirements below
A. If the client needs the streaming data on the web, the browser's supported languages such as JavaScript or TypeScript is much more suitable than Python
B. If the client needs performance, Python is obvious not a choice ("Python is a slow language").
C. If the client needs to run an application on Windows platform, the .NET technology languages like C# is more suitable.
etc.
2. EMA Library and Python Compatibility:
-The EMA (Elektron Message API) library is primarily designed for Java, C++ and .NET.
-Unfortunately, there isn’t a direct Python implementation of the EMA library.
-If you specifically need EMA features, you’ll need to use the following Java, C++ and .NET
-If an app uses EMA, it can directly consume data from RSSL connection and does not need to use websockets. RSSL offers better performance compared to WS.
-If you are considered about performance, either Python or WebSocket API are not a choice.
The WebSocket API Tutorials choose to give developers detail via Python because it is one of the easiest to understand language.The WebSocket (and the JSON message) connection is designed for supporting multiple languages, support an open-standard technology, easy to parse data. On the other hand, the RSSL connection is designed for highly distribution data application. It is the backbone of our LSEG Real-Time platform, so the EMA has a better performance than any languages on the WebSocket API.
3. Custom Java Application:
-To leverage EMA features and interact with a websocket API, create a custom Java application.
-Your Java app can handle both EMA connectivity and websocket communication.
0 -
Hello @LanceGabriel.Villacrusis
Please let me remind you that even though the EMA supports both RSSL and the WebSocket connections, the RSSL connection is the recommended on.
0 -
Sounds about right except - Python samples don't support websockets module - only websockets-client.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 中文论坛