Hello I'm not sure if I'm a hitting some sort of API Limit in EIKON when running my for loop for ...

...each 'RIC' needed using python.
here is my original for loop that i am limiting to only 50 Rics and still not getting the correct data set.
API_Key = ek.set_app_key('hidden')
fields=['Timestamp','Value']
start1 = (date.today()-timedelta(days=20*365)).strftime('2020-01-01')
end1 = date.today().strftime('%Y-%m-%d')
rng = pd.date_range(start= start1 ,end=end1 ,freq='D')
Calendar= pd.DataFrame({ 'Date': rng})
TR1_50_Rics=["TD-ABM-CPT","TD-ABM-DUR","TD-ABM-HOU","TD-ABM-INC","TD-ABM-JGA","TD-ABM-LAV","TD-ABM-LIT","TD-ABM-PHL","TD-ABM-RDM","TD-ABM-SIN","TD-ABM-FAW","TD-ABM-FAW2","TD-ABM-FAW3","TD-ABM-LIV","TD-ABM-LIV2","TD-ABM-LIV3","TD-ABM-RDM2","TD-ABM-RDM3","TD-ABM-VNT","TD-ABM-VNT2","TD-ABM-VNT3","TD-ABM-TLL","TD-ABM-TLL2","TD-ABM-TLL3","TD-ABM-BRB","TD-ABM-AUG","TD-ABM-AUG2","TD-ABM-AUG3","TD-ABM-LAV2","TD-ABM-CHI","TD-ABM-CHI2","TD-ABM-CHI3","TD-ABM-KIK","TD-ABM-KIK2","TD-ABM-KIK3","TD-ABM-YPG","TD-ABM-YPG2","TD-ABM-YPG3","TD-ABM-NGB","TD-ABM-NGB2","TD-ABM-NGB3","TD-ABM-TNJ","TD-ABM-TNJ2","TD-ABM-TNJ3","TD-ABM-SIN2","TD-ABM-SIN3","TD-ABM-SRI","TD-ABM-SRI2","TD-ABM-SRI3","TD-ABM-MTP"]
Transport_df_1 = []
for TR1_50_Ric in TR1_50_Rics:
Temp_Prod_df_1 = ek.get_timeseries(TR1_50_Rics,
fields,
start1,
end1,
normalize=True)
Temp_Prod_df_1= Calendar.merge(Temp_Prod_df_1,on='Date',how='left')
Temp_Prod_df_1['Weekday'] = Temp_Prod_df_1.apply(lambda x :x.Date.weekday(), axis=1)
Temp_Prod_df_1= Temp_Prod_df_1.rename(columns={'Security' : 'EIKON_RIC','Value' : 'Close'})
Temp_Prod_df_1 = Temp_Prod_df_1[['Date', 'EIKON_RIC','Close','Weekday']]
Temp_Prod_df_1['Close'] = Temp_Prod_df_1.Close[Temp_Prod_df_1.Weekday <= 5].fillna(method='pad')
Temp_Prod_df_1['Close'] = Temp_Prod_df_1.Close[~Temp_Prod_df_1.Weekday <= 5].fillna(method='bfill')
Temp_Prod_df_1['EIKON_RIC'] = Temp_Prod_df_1.EIKON_RIC[Temp_Prod_df_1.Weekday <= 5].fillna(method='pad')
Temp_Prod_df_1['EIKON_RIC'] = Temp_Prod_df_1.EIKON_RIC[~Temp_Prod_df_1.Weekday <= 5].fillna(method='bfill')
Transport_df_1.append(Temp_Prod_df_1)
Final_Transport_df = pd.concat(Transport_df_1)
Final_Transport_df= Final_Transport_df[['Date', 'EIKON_RIC','Close']]
Final_Transport_df=Final_Transport_df.drop_duplicates().dropna()
Here is my test to see if the data is coming back correctly.
xx = ek.get_timeseries(["TD-ABM-CPT","TD-ABM-DUR","TD-ABM-HOU","TD-ABM-INC","TD-ABM-JGA","TD-RDM2-SIN"],
fields,
start1,
end1,
normalize=True)
Thank you.
Best Answer
-
From the code, you need to use TR1_50_RIC instead of TR1_50_Rics when calling the get_timeseries method.
Transport_df_1 = []
for TR1_50_Ric in TR1_50_Rics:
Temp_Prod_df_1 = ek.get_timeseries(TR1_50_Ric, fields, start1, end1, normalize=True)
...
0
Answers
-
@daniel.burns This is returning for me fine:
fields=['Timestamp','Value']
start1 = datetime(2020,1,1).strftime('%Y-%m-%d')
end1 = datetime.today().strftime('%Y-%m-%d')
xx = ek.get_timeseries(['TD-ABM-CPT','TD-ABM-DUR','TD-ABM-HOU','TD-ABM-INC','TD-ABM-JGA','TD-RDM2-SIN'],fields,start1,end1,normalize=True)
xxAre you able to run this code and get the same result?
0 -
Yes i am getting the same results...but the problem is happening in my for loop. the screen shot you shared was my testing the results of my for loop
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
- 619 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
- 254 ETA
- 557 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
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 1.9K Refinitiv Data Platform
- 655 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
- 229 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 中文论坛