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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 0 1

Data fields for the Eikon streaming API

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

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonwebsocketsfieldsstreaming-prices
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Upvotes
Accepted
9.7k 49 38 60

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))


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Upvotes
9.7k 49 38 60

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Upvotes
9.7k 49 38 60

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.


ahs.png (12.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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:

ahs.png (33.1 KiB)
Upvotes
3 1 0 1

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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
0 0 0 0
Yeah I'll +1 on this exact issue. Data not related to the CF_ fields remains in tact and coherent while the CF_ fields simply disappear. It also started at the exact same time as OP. Any resolution or ideas? I've exhausted all my options ( port switching, fresh install, off/on the individual applications via Eikon config, colleagues API key) to no avail.
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@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.

Upvotes
3 1 0 1
Thanks Nick, that appears to work for now. Please let me know what we need to do longer term and how we can prevent this in the future.
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

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.

Click below to post an Idea Post Idea