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?

Best Answer

  • 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'})

Answers