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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
11 4 1 7

RHistory to Python ---- RIC DRYC-NTLKHH-COA

Hi,

I am trying to convert the following Excel formula to Python version.

Excel formula:

=RHistory("DRYC-NTLKHH-COA","NDA_RAW.Nda_date;NDA_RAW.Nda_last","START:01-Jan-2017 END:15-Feb-2018 INTERVAL:1D",,"CH:Fd",B2)

My Python code:

df = ek.get_timeseries( [ 'DRYC-NTLKHH-COA' ], fields='NDA_RAW.Nda_last', start_date = dt.datetime(2017, 1, 1, 0, 0, 0, 0 ), end_date = dt.datetime(2018, 2, 15, 0, 0, 0, 0 ), interval='daily', count = None, calendar = None, corax = None, normalize = False, raw_output = False, debug = False)

However, the code returns no value. Could you please help? Thanks very much.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythoneikon-com-api
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.

1 Answer

Upvote
Accepted
39.2k 75 11 27

Remove the fields parameter from your request. Try
ek.get_timeseries( [ 'DRYC-NTLKHH-COA' ], start_date = dt.datetime(2017, 1, 1), end_date = dt.datetime(2018, 2, 15))

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.

Thanks very much Alex. Working perfectly now.

Click below to post an Idea Post Idea