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
7 4 5 8

How to get access to NDA_RAW data for timeseries in Python

Hi, in Excel I use the following function to get OHLC data for futures conttracts:

=RHistory("EScv1","NDA_RAW.Nda_date;"&"NDA_RAW.Nda_open;"&"NDA_RAW.Nda_high;"&"NDA_RAW.Nda_last;"&"NDA_RAW.Nda_settle;"&"NDA_RAW.Nda_last","INTERVAL:1D",,"CH:Fd",E4)

How can I retrieve the same info using the Python API?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apinda-raw
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
Accepted
39.4k 77 11 27

If you need the last traded price, then per the suggestion in one of the threads I referenced use get_data method instead of get_timeseries. In the expression below for this future TR.CLOSEPRICE corresponds to NDA_RAW.Nda_last.

ek.get_data('EScv1', ['TR.CLOSEPRICE.date', 'TR.CLOSEPRICE', 
'TR.OPENPRICE', 'TR.HIGHPRICE', 'TR.SETTLEMENTPRICE'],
{'SDate':'-1M', 'EDate':'0D'})
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
39.4k 77 11 27

The following call will get you the same fields as listed on your RHistory example except NDA_RAW.Nda_last.

ek.get_timeseries('EScv1',['OPEN','HIGH','CLOSE'])

The answers provided on the two threads below also apply to your question.
https://community.developers.refinitiv.com/questions/20918/time-series-data-types-for-python-api.html

https://community.developers.refinitiv.com/questions/20332/eikon-python-api-get-timeseries-bidask.html

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
7 4 5 8

Thanks Alex, but I MUST have the last traded price of the future's contract. The Close or Settle is NOT what I am looking for. Why doesn't the Python API support the same functions as the Excel API?

How can I solve this, since this is the MAIN reason I chose to use Eikon

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
7 4 5 8

Thanks Alex! That solved my problem. The close is indeed the correct price I am looking for! Thanks very very much!!

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 @jerome,

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

Thanks,

AHS

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.