I have using python. I need to get the real time streaming data.

import eikon as ek
import datetime

ek.set_app_key('mykey')


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']
)
display(df)
streaming_prices.close();

This is the code I am using. but it takes too much time. Still, I am not getting any response. Guide me to get real-time streaming data.

Best Answer

  • umer.nalla
    umer.nalla LSEG
    Answer ✓

    Hi @booze007

    Do you have an instance of Eikon or Refinitiv Work running locally on the same PC or Mac as where you are running your script?

    If so, have you tried fully shutting down the instance of Eikon and restarting it?

    Also, when you generated your AppKey, did you tick the Eikon API checkbox?

    Please provide further details on what does happen when you run the above - any console output?

    If no console output, then please add the following and attach the output here as a .txt file - removing any secure information before sharing

    import logging.config 
    ek.set_log_level(logging.DEBUG) 
    ek.set_app_key('<your app key>'