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 /
avatar image
Question by arnoldpredator · Apr 22, 2020 at 06:26 PM · python api eikonget_timeseries

Error with get_timeseries

Hi Gurpreet.

After posting a thread the button to edit dissapears after a few minutes and there is no button to answer, so in practice the thread is closed and I can't answer anywhere to your comments. That is why I open a new thread with my code. In case it is possible to answer a thread, Can you tell me how?


The file 2acciones simply contains one column with ACCIONES in the first cell and all the RICS of an exchange below. I tried .SPX and others but all crashed below 200 stocks. I was not able to download the S&P 500 for example.

(edit: I got two different errors, I upload the error messages)



I add the error code, apparently the RIC giving problems was ISX.AX:


2020-04-22 20:46:41,379 P[15208] [MainThread 18380] Error with ISX.AX: No data available for the requested date range


2020-04-22 20:46:41,379 P[15208] [MainThread 18380] ISX.AX: No data available for the requested date range | 


Traceback (most recent call last):   File "C:/ES.py", line 17, in <module>  resultado = ek.get_timeseries(j, start_date = fecha_inicio, end_date = fecha_fin, interval="minute",fields= ["HIGH", "LOW", "OPEN", "CLOSE", "VOLUME"] ) 


File "C:\User ikon\time_series.py", line 198, in get_timeseries    

raise EikonError(-1, message=ts_error_messages) eikon.eikonError.EikonError: Error code -1 | ISX.AX: No data available for the requested date range | 


I get a different error, I add here what I get, no idea what this error is:


Traceback (most recent call last):
  File "C:/Users  RENTES.py", line 22, in <module>
    resultado.to_csv (filename, index = True, header=True, decimal=',')


  File "C:\Users\ pandas\core\generic.py", line 3228, in to_csv
    formatter.save()


  File "C:\Useges\pandas\io\formats\csvs.py", line 183, in save
    compression=self.compression,


  File "C:\Users\santi\PycharmProjects\oanda\venv\lib\site-packages\pandas\io\common.py", line 399, in _get_handle


    f = open(path_or_buf, mode, encoding=encoding, newline="")
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\ api\\PRN.AXresultado.csv'




This is the code I use to download the info:



 import eikon as ek


 import time 


ek.set_app_key('some number") 


a = pd.read_csv("2acciones.csv") 


lista = a['ACCIONES'].to_list() 


for j in lista:

fecha_inicio = "2020-02-23"


fecha_fin = "2020-04-20"

resultado = ek.get_timeseries(j, start_date = fecha_inicio, end_date = fecha_fin, interval="minute",fields= ["HIGH", "LOW", "OPEN", "CLOSE", "VOLUME"] ) 


filename = (r"C:\ some direction api\{}resultado.csv".format(j)) 


print (resultado) 


resultado.to_csv (filename, index = True, header=True, decimal=',') 



time.sleep(1) 

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.

2 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · Apr 30, 2020 at 05:02 PM

@arnoldpredator

  1. The error "ISX.AX: No data available for the requested date range" is self explanatory. The shares of iSignthis Limited (ISX.AX) have been suspended from trading on Australian Securities Exchange since October 2019. There are no trades recorded for this stock for the requested period of 2020-02-23 - 2020-04-20.
  2. FileNotFoundError occurs when you're trying to save a dataframe to a csv file. This error has nothing to do with Eikon. I'm afraid you need to troubleshoot it yourself. The moderators on this forum cannot help you with this. All I can say is that the line
filename = (r"C:\ some direction api\{}resultado.csv".format(j)) 

looks awkward to me. It appears you're specifying a folder name that starts with a white space, and on Windows folder names cannot start with a space.

3. "Interval is not supported" - please provide details about the error including a full traceback.

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
Answer by arnoldpredator · Apr 22, 2020 at 07:13 PM

There is a third different error saying "Interval is not supported |·"

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.

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 >
11 People are following this question.

Related Questions

Close price older than Oct 2017

For 2 stocks listed on same exchange I get different number of rows of historical data and missing minutes

How to collect first bid and first ask at a spesific time using Python API?

Hello , How to get nikkei225 index all stock daily weighting by eikon with python API ? thank you.

ERROR module 'eikon' has no attribute 'set_app_id'

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • 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
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges