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
0 3 4 7

Historical Share price data - Python

Hi, Im looking to pull historical share price data Open,Mid and Close for apple as an example for a period of 12 months but using Apples ISIN code - US0378331005 .

Is this possible? and if so any help would be appreciated.


Many thanks in advance


pythonpython 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.

@peter.akester

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@peter.akester

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

Upvote
Accepted
17.3k 82 39 63

Hi @peter.akester

I think the best route for you is to review some learning material that will answer most of your questions. Here are a few links that I believe will help you:

  1. Historical Pricing Tutorial
  2. Historical Pricing examples

The one thing I will recommend is when you make a request for historical data, you can optionally leave the 'Fields' parameter out. What this will do is return all fields for the data you requested. For example, here are daily prices for Apple:

ahs.png

If I want to get intraday values (5 - minute bars), near 12 GMT:

ahs.png


ahs.png (121.7 KiB)
ahs.png (97.2 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.

Upvotes
5.8k 21 2 6

Hi @peter.akester ,


It is very much possible, have you had a look at this documentation for the RD Python library (link below)?

https://developers.refinitiv.com/en/api-catalog/refinitiv-data-platform/refinitiv-data-library-for-python

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.

Hey @jonathan.legrand , ive tried similar but it doesnt seem to work using ISIN codes

Upvotes
166 2 1 3

You need to translate ISIN into RIC before leveraging ek.get_timeseries() to retrieve 12 month historical data.

1666022203052.png


1666022203052.png (42.6 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.

Upvote
17.3k 82 39 63

Hi @peter.akester

The historical API calls only accept RICs. Using the Refinitiv Data Library for Python, you can do the following:

ahs.png


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

Upvotes
0 3 4 7

@nick.zincone @frank.ling1 thanks for these. Would it be possible to have an output like this? Im looking to pull multiple ISINs.screenshot-2022-10-17-172920.png


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.

Hi @peter.akester

The backend does not provide a stock response in the way you prefer. The only way I would go about it is to request for your data and programmatically manipulate into your organization. You can request for multiple ISINs but the processing wouldn't necessarily be any less complicated.

@nick.zincone ok think ive got something working. Can i also set a specific time? im wanting to pull the historic data as at 12pm
Hi @peter.akester

The granularity of the data and the available fields is based on the bars you are requesting. In your case, you are requesting for historical elements based on monthly bars - so for values that are 'LOW_1', 'HIGH_1', etc are the related to the low, high values within a month. I don't know what you should expect to be returned when you get the fields within a monthly bar at 12 p.m? There is a way to request for intraday values within a day and you can specify a time range, but it is unclear what you need.

I would suggest you reach out to the Refinitiv Helpdesk and raise a content question if you want to better understand how the data is collected.

Show more comments

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.