Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

Is there time delay for "cf_last"?

I was downloading real-time stock price for constituents of S&P 500.

But, I checked there are same value for 09:30 ~ 9:45.

For all stock price.

I executed code as below.


spx_cons = ['MMM.N', 'AOS.N', 'ABT.N', ....]

data, err = ek.get_data(spx_cons, ['CF_LAST'])


check please.


And, is there other way to get real-time stock price data?

If is, please let me know.


Thank you

eikon-data-api#product
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.

Hi @dw.jung ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
10.2k 18 6 9

               

@dw.jung Thanks for your question - I would use the Refinitiv Data Libraries to achieve this using a realtime pricing stream and a snapshot request -

!pip install refinitiv-data
import refinitiv.data as rd
rd.open_session()
df = rd.get_data('0#.SPX',['TR.RIC'])
df

1709568897734.png

stream = rd.open_pricing_stream(
    universe= df['Instrument'].tolist(),
    fields=['BID', 'ASK']
)
stream.get_snapshot()

1709568968326.png

stream.close()
rd.close_session()

You can call get snapshot at any time as the pricing stream will populate a local cache in the background continuously. I hope this can help.


1709568897734.png (65.4 KiB)
1709568968326.png (81.0 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.

Upvotes
1 0 0 2

Thank you for reply.


is there guide for "refinitiv.data"?

I have used only eikon module.

So it's not familiar.


Specifically, I want to get real-time data for "SPXL", "SPXS" and S&P 500 index.


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
10.2k 18 6 9

@dw.jung We have full interactive examples which you can access using the CodeBook app (type Codebk into Eikon search bar) and the go the the Examples folder and under Data Retrieval:
1709569615601.png If you goto 01.01. Refinitiv Data Library you will find the Access layer examples most helpful. These are the highest level of abstraction ie one-line function calls and are easiest to use. From the Library link I posted above you can see the Overview, Quickstart Guide, Documentation, Reference Guides and Tutorials. You can download the library using pip :

pip install refinitiv-data

I hope this can help.


1709569615601.png (297.8 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.

Upvotes
1 0 0 2

Thank you your kind

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.

My pleasure!
Upvotes
1 0 0 2

Is there no way get recently contracted price? not bid or ask?

and for S&P 500 index real-time price?


And data from streaming is not real-time.

Do I did wrong way?

I just followed your word

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
10.2k 18 6 9

@dw.jung Streaming data is live assuming you have permission to live prices from that exchange - otherwise you might get a 15 minute delayed price - denoted by a / in front of the RIC eg /VOD.L. The field for last traded price or value is "CF_LAST" - so you can just add or replace that to the field list in the API call. To see a full list of fields available for any instrument - please use the Data Item Browser app (type DIB into the Eikon / WS search bar) - type the instrument into the instrument bar and you can see a list of fields and also values - you can also open up the filter panel on the left hand side and then narrow down the content sets you want to search.
1709635109652.png

I hope this can help.


1709635109652.png (143.9 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.

Thank you for your reply.

If you don't mind me asking, how can I get permission from exchange and how much for it?

Hello @dw.jung

I strongly suggest you contact your LSEG representative to help you with the permission (and pricing).

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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