I was using the following call to get bid/ask/last data using Eikon's streaming API.
sp = ek.StreamingPrices(instruments = ['XOM'], fields = ['CF_BID','CF_ASK','CF_LAST', 'CF_DATE', 'CF_TIME'] sp.open() sp.get_snapshot()
Everything was working fine till this morning and now all I get is the following:
Instrument 0 XOM
It looks like it does not recognize the data fields anymore. Did something change on the back-end? If so, what are the new fields I should be requesting?
Appreciate any help you can provide.
Thanks,
Matt
Hi @matt.edwards,
I don't have visibility into when these updates occur. Have you tried the request without specifying the service parameter?
Yes, just tried it without the service parameter and the call still fails to return any CF_* fields.
Hi @matt.edwards,
Thanks for confirming. Let me open a ticket with the support desk on your behalf.
Hi @matt.edwards, @jordan.carney,
There appears to be some changes in the API Proxy that may be affecting some customers. This is currently being looked into and I will update you once I hear back.
In the meantime, try the following to see if it helps. Note: the code segment below includes a setting for service.
sp = ek.StreamingPrices(instruments = ['XOM'], fields = ['CF_BID','CF_ASK','CF_LAST', 'TRDPRC_1', 'HST_CLOSE'], service = "IDN_RDFNTS_CF", on_refresh = lambda sp, instrument, fields : print(fields), on_update = lambda sp, instrument, fields : print(fields), on_status = lambda sp, instrument, status : print(status))
Hi @nick.zincone.1, any updates on this? Do I need to always set the "service" going forward and can it change? Thanks.
Hi @matt.edwards,
I have not heard back but will update you here when I do. Going forward, you should not have to set the service. I believe this should be resolved once the Proxy is updated.
Hi @matt.edwards,
It is likely due to the time of day you requested for this data. If you requested the data before market open, the data elements you requested may have been blanked out during the closing run for this particular instrument. At some point outside of trading hours, perhaps very early in the morning or late a night, the values were reset. The closing run is dependent on the exchange or feed providing the data in the backend. Did you try after market open? I just tried now and I do see values.
Hi Nick:
I just tried and get the same response. I have tried this while the market was open and then after it was closed. Never had an issue with these since I have been using this in the last 3 months - even after the market close I would get values along with the last update time and date. Now I get nothing.
Hi @matt.edwards,
Ok, thanks for confirming. If this was working before, then there is likely something within your environment. Below is the full notebook I just tried within Eikon:
I would first try this and show your output as I did. If you haven't done so already, shutdown and restart Eikon. I don't have an immediate explanation if the above example gives you completely different results - we'll have to troubleshoot further.
Hi @nick.zincone.1:
Thanks for following-up. I restarted Eikon and have tried a different machine as well with the same results. Here is the output from my last session. Note: I have added "OPEN_PRC" as one of the fields and it seems to be the only one working
In [2]: import eikon as ek ...: ek.set_app_key(appKey) ...: ek.__version__ Out[2]: '1.1.2' In [3]: sp = ek.StreamingPrices( ...: instruments = ['XOM'], ...: fields = ['CF_BID','CF_ASK','CF_LAST', 'CF_DATE', 'CF_TIME', 'OPEN_PRC'] ...: ) In [4]: sp.open() Out[4]: <StreamState.Open: 3> In [5]: sp.get_snapshot() Out[5]: Instrument OPEN_PRC 0 XOM 45.35 In [6]:
Can you change the request to steam prices to this:
sp = ek.StreamingPrices(universe = ['XOM'], fields = ['CF_BID','CF_ASK','CF_LAST', 'TRDPRC_1', 'HST_CLOSE'], on_refresh = lambda sp, instrument, fields : print(field), on_update = lambda sp, instrument, fields : print(field), on_status = lambda sp, instrument, status : print(status))
I'm just curious if this is specific to CF_<field> fields. I removed a few of the CF_<fields> you had in your original call and replaced them with some realtime fields.
This is what happens when I apply the above:
Yes, it does look like it mainly the 'CF_' fields. I tried your code and got the following:
In [20]: sp.open() {'TRDPRC_1': 48.38} {'TRDPRC_1': 48.37} {'TRDPRC_1': 48.37} {'TRDPRC_1': 48.365} ... {'TRDPRC_1': 48.4201} {'TRDPRC_1': 48.425} {'status': <StreamState.Open: 3>, 'code': 'Open', 'message': 'All is well'} {'TRDPRC_1': 48.42, 'HST_CLOSE': 47.14}
Out[20]: <StreamState.Open: 3> In [21]: sp.get_snapshot() Out[21]: Instrument TRDPRC_1 HST_CLOSE 0 XOM 48.41 47.14
So, I did get values for TRDPRC_1 and HST_CLOSE but nothing for any of the 'CF_*' fields.
@jordan.carney, @matt.edwards,
I’ve reached out to the product group to report this issue. I will post an update once I hear back. Thanks for your patience.
Hi @matt.edwards,
If you encounter issues with the Proxy process within Eikon again, the best way to get things resolved quickly and to have visibility into when it will happen is to go through the Refinitiv Support desk.
StreamingPrices limits on Data API
Can I change the row header with the 'Rh' parameter using the Eikon Data API?
How to obtain Reuters central bank key rate polls in Python with Data API (Codebook)?
Proper parameters for retrieving bid ask information via Eikon Data API via Python.
No data available for Dutch stocks between 17:30 and 17:35 local time.