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
39 3 3 7

Inconsistency b/w ek.get_data() and ek.get_timeseries()

Hi,

While trying to retrieve the historical data for some convertibles (RICs = ['JEdbc.TO^I20', 'JEdbd.TO^I20], I got inconsistent results from ek.get_timeseries() and ek.get_data(). Specifically, the former returns data while the latter returns NA. See detail below,

df = ek.get_timeseries(rics, start_date=dt.datetime(2020,3,25),

end_date=dt.datetime(2020,3,31))

df


JEdbc.TO^ I20JEdbd.TO^I20
HIGHCLOSELOWOPENCOUNTVOLUMEHIGHCLOSELOWOPENCOUNTVOLUMEDate











2020-03-252323.0016.5017.0189000017.0017.0016.9917.005190002020-03-262423.0220.0020.0032400017.2617.2617.0117.0151050002020-03-272622.0022.0025.001411700018.5018.5018.0018.006750002020-03-302018.0018.0020.0098700018.5018.5018.0018.005700002020-03-312020.0019.0119.0142900025.0025.0025.0025.00320000



df1, er = ek.get_data(rics, ['TR.PriceClose', 'TR.IssueMarketCap', 'TR.IssueMarketCap.Date'],

{'SDate':'2020-03-25', 'EDate':'2020-03-31'})

df1

Instrument Price Close Issue Market Cap Date

JEdbc.TO^I20 <NA><NA><NA>

JEdbd.TO^I20<NA><NA><NA>


Lastly, a call of get_timeseries() using package eikonapir in R results in errors:

get_timeseries(list('JEdbc.TO^I20', 'JEdbd.TO^I20'), list("*"),

start_date = '2020-03-25',

end_date = '2020-03-31')

# Error in 1:nrow(input_data_frame) : argument of length 0


I would highly appreciate if you could look into these inconsistencies and advise any suggestions/solutions.

Thanks,

TH

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apieikon-data-api-r
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
22k 58 14 21

I am not familiar with R, but could you try named arguments like -

get_timeseries(rics = list('JEdbc.TO^I20', 'JEdbd.TO^I20'), fields = list("*"), start_date = "2020-03-25T00:00:00", end_date = "2020-03-31T00:00:00")

and see if that works. If it still does not, we can try to figure it out.

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.

The problem with the get_timeseries call syntax for R in the original question is incorrect date format. get_timeseries function in eikonapir package is very inflexible with regard to the format of start_date/end_date inputs. According to the package documentation get_timeseries function strictly expects start_date and end_date as strings in "%Y-%m-%dT%H:%M:%S" format. The values provided in the original example are missing the time part.

Upvotes
22k 58 14 21

Hi @tta,

Please see this answer about the differences between get_data and get_timeseries api call. These both access a different backend service and the timeseries can only retrieve Open/High/Low/Close bar data.

The fields that you specified - TR.PriceClose, TR.IssueMarketCap are not available in Data Item Browser for this convertible debenture.

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

Thanks Gurpreet for pointing to the difference b/w get_data() and get_timeseries()!

What about the problem of get_timeseries() of eikonapir?

Thanks!

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

Surprisingly, it work!

I did not expect the function is such sensitive to its arguments.

Thanks a lot for your advice, highly appreciate it.

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.

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.