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
25 5 5 9

python eikon API - is there a parameter value for Edate which will get "all" the available history?

I have the following code:

df=ek.get_data('4295905573',['TR.PriceClose.Date', 'TR.PriceClose'], {'SDate':0, 'EDate':-365})

Is there a way to get "all" the available history, instead of setting it at a specific number of days?

Similarly, if I want to only get up to the last day of data for a company, is there an SDate value that will start on the "last" avaialble date automatically? If I set SDate to 0, and the EDate to say -5000, for a company that delisted say 1 year ago, it fills the whole 5000 reefcords with the last available value forward filled to "today"

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Upvote
Accepted
3.8k 4 4 6

@lgreen, you can try this workaround to get the timeseries from the first trading date:


dftemp,err=ek.get_data('4295905573','TR.FirstTradeDate')
start = dftemp['First Trade Date'][0]
df,err=ek.get_data('4295905573',['TR.PriceClose.Date', 'TR.PriceClose'], {'SDate':0, 'EDate':start})
df
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.

would that go for the last trade date also? for companies that may be delisted?

@lgreen

as suggested by @chavalit.jintamalit you can use TR.RetireDate. If the TR.FirstTradingDate is null then you may try:

ek.get_data('TRIL.L^I09','MIN(TR.PriceClose.date)',{'SDate':0, 'EDate':-9999})


Upvote
18.2k 21 13 21

Hi @lgreen

There is no parameter to get "all" the available history.

For delisted company, you can get 'TR.RetireDate' and use it as the end date parameter.


Please also review API limitation at https://developers.refinitiv.com/en/api-catalog/eikon/eikon-data-api/documentation


ahs.png (33.3 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.

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.