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)
Best Answer
-
- 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.
- 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.
0
Answers
-
There is a third different error saying "Interval is not supported |·"
0
Categories
- All Categories
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 613 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 630 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 86 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛