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 2 1

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) 
eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-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.

Hello

@chavalit.jintamalit, @Alex Putkov., @jirapongse.phuriphanvichai

Please help to answer the client's question.

@arnoldpredator

Thank you for your participation in the forum.


Is the reply below satisfactory in resolving your query?

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

Otherwise please post again offering further insight into your question.


Thanks,

AHS

Hello @arnoldpredator

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hello @arnoldpredator,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

@arnoldpredator

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

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

Show more comments
Upvotes
Accepted
39.4k 77 11 27

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

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 2 1

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

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.

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.