Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

avatar image
Question by giosue.bruccoleri01 · Apr 14, 2021 at 07:31 AM · eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikondatatime-seriestrade

Unable to retrieve stock prices before 2008 with get_time_series

I'm trying to build a database with the adjusted close prices for all the components of the Stoxx 600, from 2000 to 2020. But I only get data no earlier than 2008, even for those stocks that existed before that year (i.e. volkswagen). I'm using this code and getting the result below.

adjusted_prices = []
for stock in range(len(rics)):
    adjusted_prices.append(ek.get_timeseries(rics[stock], fields='CLOSE', start_date="2000-01-01", end_date="2020-12-30", interval="daily", corax="adjusted")
schermata-2021-04-14-alle-093006.png (127.3 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by chavalit · Apr 14, 2021 at 07:50 AM

Hi @giosue.bruccoleri01

Please review API limitation guideline at https://developers.refinitiv.com/en/api-catalog/eikon/eikon-data-api/documentation

In your case, the API exceeds the maximum data point per API call.

You can reduce the time period and make them into multiple API calls, so the result would not exceed the maximum number of data point.

Comment
giosue.bruccoleri01

People who like this

1 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by giosue.bruccoleri01 · Apr 14, 2021 at 08:11 AM

Hi, thank you for the help, but there is a problem with it, I downloaded the ric's list of the STOXX 600 components as of today to run this code, the problem is that if I set a range from 2000 to 2008 a lot of these stocks won't have data for the specified range, so python will return an error code -1. Is there a way to get a list of Rics for the period I want? Or maybe a way to create exceptions on python for this error so that ignore that stocks with no data?

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Answer by chavalit · Apr 14, 2021 at 10:33 AM

Hi @giosue.bruccoleri01

You can use try/except code block.


ahs.jpg (55.7 KiB)
Comment
giosue.bruccoleri01

People who like this

1 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
giosue.bruccoleri01 · Apr 14, 2021 at 02:15 PM 0
Share

I tried with this solution, but it stops until the first error, so I get only the first six stocks, do you know how to make the process skip the error and go on with the other stocks?

schermata-2021-04-14-alle-161118.png (276.1 KiB)
schermata-2021-04-14-alle-161357.png (262.9 KiB)
avatar image
REFINITIV
chavalit ♦♦ giosue.bruccoleri01 · Apr 14, 2021 at 02:43 PM 1
Share

Hi @giosue.bruccoleri01

You can arrange your code to be like this:

Note that this is a pseudocode.

for ric in ric_list:
    try:
        df = ek.get_timeseries(ric, xxx, xxx)
        #if you code is here, you get the data successfully
        #process df according to your requirement
    except ek.EikonError as err:
        print(err)
        #if you code is here, you get some error
    #this is end of try/except block, back to for loop


Please also review Python For loop tutorial.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

Retrieve Portfolio charted performances API from PORT app

Python Eikon API get_timeseries or get_data to retrieving economic datatype. I am currently using USWDDLO5P in Eikon and excel plug in. What I have tried: df, err = ek.get_timeseries(["USWDDLO5P"])

Total Returns and Price Returns over specific periods

Pulling GDP time series for country

Requesting TR time series data for listed and delisted rics.

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • FX Venues
    • FX Trading – RFQ Maker
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • Yield Book Analytics
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges