For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
7 1 0 2

Service Parameter on Eikon Python API getting error

Client is using Python API to connect get streaming data into a python project.
The problem is, he's not able to use the 'service=' parameter in the eikon.StreamingPrices function.
He has no problems when he calls .open on the following:
ek.StreamingPrices(
instruments = ['SFCc1', 'SFCX2', 'EScv1', 'NQcv1','WINc1'],
fields = ['DSPLY_NAME', 'TRDPRC_1', 'ACVOL_1'])

But if he adds a service parameter, he will get the "P[XXXXX] [WebSocket X XXXXX] websocket connected" message, but it will never actually compute and allow him to call anything on the opened connection.
Ex:
ek.StreamingPrices(
instruments = ['SFCc1', 'SFCX2', 'EScv1', 'NQcv1','WINc1'],
fields = ['DSPLY_NAME', 'TRDPRC_1', 'ACVOL_1'],
service = 'IDN_SELECTFEED')


Do you have any idea why he's having this issue?

eikon-data-apipythonpython apistreaming-prices
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
Accepted
32.2k 40 11 19

Hello @kenley.macandog123 ,

From my testing today, I was also able to specify both IDN_RDF and IDN_RDFNTS_CF as service. This is different from my previous testing, via Refinitiv Workspace CodeBook. I am in the process of testing more, to be sure.

However, I would like to help, so would like to share some thoughts:

From the information shared, Eikon is configured with streaming prices from local RMDS, rather than realtime endpoints in cloud. Is this the case?

Please confirm if the client is running python from a local machine (command line, Jupyter, VSCode, etc.) , or from inside Eikon, via CodeBook?

If from a local machine, that can establish connectivity to RMDS, a more attractive approach to streaming could be to do so directly: to use Refinitiv Data Library Python, rather than Eikon Data API, to connect directly, via platform session, for example:

import refinitiv.data as rd
from refinitiv.data.content import pricing
from pandas import DataFrame

# platform.deployed session is defined via config to point to local ADS, websocket port
rd.open_session('platform.deployed')   

stream = rd.content.pricing.Definition(
    universe = ['EUR=', 'GBP=', 'JPY=', 'CAD='], 
    fields = ['BID', 'ASK'],
    service = 'ELEKTRON_DD'   # our testbed service that can differ
).get_stream()
stream.open()
df = stream.get_snapshot()
display(df)

Please find documentation on Refinitiv Data Library for Python for reference.

Let us know how this works on the client side and what was the feedback?







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.

@zoya faberov I have been chasing client if he's already set with the information you provided above and he is still testing as of the moment and have been busy for the week.


Can you advise on the below follow-up question?


"Am I correct in assuming rd.content.pricing.definition().get_stream() is a more modular approach to the rd.get_data() function, or are there some more fundamental changes to the setup?"

Hello @kenley.macandog123 ,

RD Library is comprised of the layers, that differ in level of abstraction, please see Data Library Examples ReadMe for the brief details.

In my understanding- very close: get_data at the Access layer is a simplified ease of use approach for access, and pricing definition from Content layer offers a fully functional interface, to the same being the layer below.

Upvote
32.2k 40 11 19

Hello @kenley.macandog123 ,

I would like to confirm that the client's Eikon/Refinitiv Workspace has the service named 'IDN_SELECTFEED' configured.

For instance, mine only has service named 'IDN_RDFNTS_CF' defined.

Therefore, I am able to issue the call with service parameter and test:

sp = ek.StreamingPrices(
instruments = ['SFCc1', 'SFCX2', 'EScv1', 'NQcv1','WINc1'],
fields = ['DSPLY_NAME', 'TRDPRC_1', 'ACVOL_1'],
service = 'IDN_RDFNTS_CF')
sp.open()
sp.get_snapshot()

The result looks like:

res1.gif

But service = 'IDN_SELECTFEED' fails for me. The realtime service availability can be verified with "About Refinitiv Workspace" -> Streaming or Eikon Configuration Manager tool.

Hope that this information helps


res1.gif (20.7 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.

@zoya faberov


See response from client


Interestingly enough, I’m actually getting a response when entering IDN_RDF as a parameter. However, I can’t see IDN_RDF under the list of data feeds.

These are the available data feeds:

Am I overlooking some sort of service identifier?

I’m not seeing IDN_RDF when looking at the output of of the “COPY TO CLIPBOARD” functionality:

Ideally, I’d like to connect to the “M (MDS)” feed.


Pleaser advise.

Hi @kenley.macandog123 ,

I am unable to see any of the included screenshots, they come up as broken image, do they upload successfully on your side?

@zoya faberov


Hi Zoya,


Interestingly enough, client is getting a response when entering IDN_RDF as a parameter. However, he can’t see IDN_RDF under the list of data feeds.

These are the available data feeds on his Eikon:


Client is not seeing IDN_RDF when looking at the output of of the “COPY TO CLIPBOARD” functionality:

Ideally, he’d like to connect to the “M (MDS)” feed. Please advise.