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
24 1 1 4

Extract historical trade date with Eikon API

I am trying to use the following code to get the historical market cap with related trade date. But there is only one response for trade date, not the corresponding series. How to solve it?

df, err=ek.get_data('0700.HK',['TR.CompanyMarketCap','Trade_Date'],{'SDate':'2020-01-01','EDate':'2020-02-10','Frq':'D'})

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apieikon-app-studio
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.

Hello @Jayden.Zhang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
78.8k 250 52 74

@Jayden.Zhang

Refer to Eikon Excel Formula Builder, TR.CompanyMarketCap is in the Time Series Ratios category which can provide time-series data. However, TRADE_DATE is in the Real-Time category which doesn't provide time-series data.

To get the date field of TR.CompanyMarketCap, you can use the TR.CompanyMarketCap.Date field instead.

df, err=ek.get_data('0700.HK',
                    ['TR.CompanyMarketCap','TR.CompanyMarketCap.Date'],
                    {'SDate':'2020-01-01','EDate':'2020-02-10','Frq':'D'})
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.

Thanks!!! It's just what I want

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.