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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
629 2 4 7

How can I retrieve the historical values for RIC .AD.US using either the Eikon Data API, or the Historical Pricing API in CodeBook?

For RIC .AD.US I am able to bring in current values using Eikon Data API and RDP,, but not historical... can you please guide on best way to bring in any of these fields historically... It seems they are available via Eikon Excel; but when I try using ek.get_data() I am only able to retrieve the most recent value; ek.get_timeseries() does provide a time series of total volume but nother else. I really need the number of Avancers and decliners historically.

When I try using rdp.HistoricalPricing.get_summaries('AD.US') I get "None" as an output.


df, err = ek.get_data(['.AD.US'], ['ISSUES_ADV','ISSUES_DEC','ISSUES_UNC',

'TOT_ISSUES','NEW_HIGHS','VOLUME_ADV',

'VOLUME_DEC','VOLUME_UNC','TOT_VOLUME','NEW_LOWS'])

df


eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonhistorical
capture.png (17.9 KiB)
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.

Upvotes
Accepted
39.2k 75 11 27

Function layer of RDP Library is easier to use (but less flexible) than Content Layer. So, the easiest way to retrieve this data is to use the function layer of RDP Library:

rdp.get_historical_price_summaries('.AD.US')

The above function returns pandas dataframe.

This said, you should be able to use Content layer, if you wish. On my end I do not reproduce rdp.HistoricalPricing.get_summaries('.AD.US') returning None. It returns an object of type "refinitiv.dataplatform.content.data.historical_pricing.HistoricalPricing.HistoricalPricingResponse". To extract the payload from this object you need to utilize object's properties and methods. E.g. to get the same result you get from rdp.get_historical_price_summaries function you can use

res = rdp.HistoricalPricing.get_summaries('.AD.US')
res.data.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.

Upvotes
9.7k 49 38 60

Hi @James.Perkins,

You can use the Historical Pricing API.

Try this example retrieving daily values in the month of Dec 2020.

rdp.get_historical_price_summaries(
         universe = '.AD.US',
         interval = rdp.Intervals.DAILY,
         start = '2020-12-01',
         end = '2020-12-31'
)


1610062078011.png (277.3 KiB)
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.

thank you Nick.

thank you again for the answer; why do none of the above solutions seem to work for RIC .IBBEU003D ?

Click below to post an Idea Post Idea