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?

Best Answer

  • zoya faberov
    zoya faberov ✭✭✭✭✭
    Answer ✓

    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?







Answers