get_timeseries function returns with date range loss

Hi there,
I am encountering a problem with <get_timeseries> function when retrieving historical commodity price with Eikon API. pls refer to details below.
If I pass one certain RIC to the rics parameter, like 'SF^1' in screenshot scenario 1, everything works well that historical data is returned from the the first trading day (2015-11-13) to last trading day (2018-01-12) in this example. PS: start_date parameter is set large enough to include the whole date rage.
But if I pass a list of RICs to the rics parameter, like ['SF^1', 'SH8^1', 'SK8^1....'SX8^1'] in screenshot scenario 2, the returned historical data starts from 2016-05-04, which means historical data before this date for some RIC is lost.
Thanks!
scenario 1:
scenario 2:
Best Answer
-
hi @gtaxinstitute ,
There's a limit on data returned from the get_timeseries function, for more detail, please check Eikon Data API Usage and Limits Guideline
However, to get all of the data available for each RIC, you may call the function on each instrument and then merge them together using Python, for example
# create a list of RICs
rics_list = ['SF8^1', 'SH8^1', 'SK8^1', 'SQ8^1', 'SU8^1', 'SX8^1']
# create Python dictionary to store all output dataframes
dfs = {}
i = 0
# call get_timeseries on each RIC
for _ in rics_list:
dfs[i] = ek.get_timeseries(_, 'CLOSE', start_date='2010-01-01')
i += 1
# merge the dataframes together and rename the column name to be each RIC instead of CLOSE
for j in dfs:
if j == 0:
df = dfs[j]
else:
df = df.merge(dfs[j], how='outer', on='Date
df.rename(columns = {'CLOSE':dfs[j].columns.name}, inplace = True)
display(df)and here's the output
Hope this helps and please let me know in case you have any further questions
0
Answers
-
Thanks very much for you prompt feedback, I got the reason now and your suggestion/script works pretty well!
if you don't mind, another small question linked with <get_timeseries> function is that is it possible for me to retrieve the 'open interest', 'open interest change' data and settlement price, rather than closing price ruled by 'CLOSE' fields, as the public handbook display no available relevant fields parameter.
thanks in advance!
0 -
@gtaxinstitute ,hi
Just for information to any viewers of this question, the question in this reply is also being asked in this thread and the answer was provided
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
- 687 Datastream
- 1.4K DSS
- 622 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
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 671 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
- 918 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
- 48 中文论坛