I can't retrieve data any more via EIKON python API. For example time series data (prices) for .5...

KarenHazel
LSEG
I can't retrieve data any more via EIKON python API. For example time series data (prices) for .5SP20 leads into "Server returns error. Please try again" or "Insufficient data".
0
Best Answer
-
Now it works. Could it be, someone restarted the API server?
0
Answers
-
The following code can help you to reproduce the error messages
import eikon as ek
from datetime import date, datetime, timedelta
import dateutil.relativedelta as dateutil
from sqlalchemy import create_engine
from sqlalchemy.sql import select
import numpy
import time
ek.set_app_key('YourAppKey')
retrials = 0;
starting = datetime.now()
print('Gestartet: ' + starting.strftime("%H:%M:%S"))
# input Parameter ANFANG
table_name = "dbName"
table_mode = "replace"
max_retries = 50
rrg_index = [
[".IXIC", ".5SP10", ".5SP15", ".5SP20", ".5SP25", ".5SP30", ".5SP35", ".5SP40", ".5SP45", ".5SP50", ".5SP55", ".5SP60"],
[".SPX", ".5SP10", ".5SP15", ".5SP20", ".5SP25", ".5SP30", ".5SP35", ".5SP40", ".5SP45", ".5SP50", ".5SP55", ".5SP60"],
[".E1DOW", ".E1TEC", ".E1IDU", ".E1NCY", ".E1FIN", ".E1TLS", ".E1UTI", ".E1HCR", ".E1ENE", ".E1CYC", ".E1BSC"]
]
# input Parameter ENDE
print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
print('Tabelle: ' + table_name)
print('Modus: ' + table_mode)
print('++++++++++++++++++++++++++++++++++++++++++++++++++++++++')
try:
retrials_1 = 0
con = engine.connect()
end = datetime.now() - timedelta(days=1)
start = end - timedelta(weeks=40)
start_string = start.strftime("%Y-%m-%d")
end_string = end.strftime("%Y-%m-%d")
print(start_string)
print(end_string)
for row in rrg_index:
main_index = row[0]
print(main_index)
i = 0
while (i < len(row)):
aRIC = row[i]
print("Load " + aRIC)
time.sleep(2);
try:
req = ek.get_timeseries(aRIC, start_date=start_string , end_date=end_string, interval='weekly', corax='adjusted')
print('Ergänzung um Datum und Index und speichern.')
# do some database work
table_mode = "append"
i = i + 1
retrials_1 = 0
except Exception as anExc:
print('Exception:')
print(anExc)
print('### RIC ###')
print(aRIC)
if retrials_1 > max_retries:
i = i + 1
print("ACHTUNG:", aRIC)
retrials_1 = retrials_1 + 1
time.sleep(3);
retrials = 0
except Exception as anExc:
print('Exception:')
print(anExc)
print('Beendet.')0 -
Hi Sven adding my comment here if this may help on the issue. Upon further investigation. "Server returns error and Insufficient data" might be related to Eikon data limitation when retrieving time series data. For <.5SP20>, please note that for retrieving intraday data (like for end-of-day RICs) it is only limited to 3 months.
0 -
Hi Sven glad to know it is now working on your end. I have monitored the instrument as well but has not recorded any issue. Not just sure with the API server itself.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 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
- 252 ETA
- 556 WebSocket API
- 38 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
- 652 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛