Historical 1 minute interval data between 15:30 – 17:30 CET for the last 90 days

Hi Team,
Can you advise what script can we use in Python Eikon API to get the Historical 1 minute interval data between 15:30 – 17:30 CET for the last 90 days.
Sample RICs
ADSGn.DE
AIRG.DE
ALVG.DE
BASFn.DE
BMWG.DE
Best Answer
-
Hi @dianne.palmario and @kenley.macandog123,
Here's the code
import eikon as ek
import pandas as pd
import datetime
ek.set_app_key('####YOUR_APP_KEY####')
rics = ['ADSGn.DE','AIRG.DE','ALVG.DE','BASFn.DE','BMWG.DE']
df_list = []
today = datetime.datetime.today()
start_date = today - datetime.timedelta(90)
# looping to get the data of 30 days in each call
while start_date < today:
end_date = start_date + datetime.timedelta(days=30)
df = ek.get_timeseries(rics, start_date=start_date, end_date=end_date,interval='minute')
df_list.append(df)
start_date = end_date + datetime.timedelta(days=1)
result = pd.concat(df_list)
#display(result)
# filter the time interval
df_duration = result.iloc[(result.index.time >= datetime.time(14, 30))&(result.index.time <= datetime.time(16, 30))]
display(df_duration)Hope this helps and please let me know in case you have any further questions.
0
Answers
-
Hi @kenley.macandog123 ,
Is this what you're looking for?
First, to get the Historical 1-minute interval data in the last 90 days. However, as there's a limit of an API call in Eikon, so please check this Eikon Data API Usage and Limits Guideline and adjust the start_date, and end_date to not exceed the Eikon Limits.
import eikon as ek
import datetime
from datetime import time
ek.set_app_key('####YOUR_APP_KEY####')
df = ek.get_timeseries(['ADSGn.DE','AIRG.DE','ALVG.DE','BASFn.DE','BMWG.DE'],
start_date=datetime.timedelta(-90),
end_date=datetime.timedelta(0),
interval='minute')
display(df)Then after you get the data of the last 90 days, you can filter only the time you're interested, to confirm the timezone of data returned, you may check with the Content team by raising the ticket via MyRefinitiv.
Hope this helps and please let me know in case you have any further questions.
0 -
Hi @kenley.macandog123 and @dianne.palmario ,
as mentioned in this thread that
get_timeseries method of Eikon Data APIs library always returns timestamps in GMT.
You may find another way to do the time conversion, in this case, I'm using the time range you used
df1 = df.iloc[(df.index.time >= datetime.time(14, 30))&(df.index.time <= datetime.time(16, 30))]
display(df1)However, as the data returned is less than latest 90 days due to the Eikon API call limit, you need to call a get_timeseries function in loops with the parts of latest 90 days and then merge the data together.
Hope this helps and please let me know in case you have any further questions.
0 -
Can you please provide a script that calls a get_timeseries function in loops with the parts of latest 90 days? Like how the script would look like so that we can see more than the latest 90 days limitation?
0 -
thx a lot for the script, a nice way to solve the problem.
I appreciate it a lot.
Regards,
Silvio
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛