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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
23 0 1 2

Get maximum price of stock within a date range

How can I use Eikon API to extract maximum price of stock over a specfic date range? I am using python to extract the maximum price.

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonequities
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
3.8k 4 4 6

@f.hashim

You can do it directly on a dataframe

df,err = ek.get_data('VOD.L',['TR.HIGHPRICE','TR.HIGHPRICE.date'],{"Sdate":'2020-01-01', "Edate":'2020-09-10'})
df[df['High Price']==df['High Price'].max()]
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
18.1k 21 12 20

Hi @f.hashim

For the today high, you can use get_data() and use "HIGH_1" field.

For historical data, you can use get_timeseries() and use "HIGH" field.


ahs1.png (11.4 KiB)
ahs2.png (28.1 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.

I need to get maximum value from the time series is there a field that can give a maximum of `HIGH` field over a specific date range?