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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
24 1 0 1

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythoneikon-app-studio
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
38.1k 71 35 53

@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 5.0 MiB each and 10.0 MiB total.

Thanks!!! It's just what I want

Click below to post an Idea Post Idea