Inconsistency b/w ek.get_data() and ek.get_timeseries()
Hi,
While trying to retrieve the historical data for some convertibles (RICs = ['JEdbc.TO^I20', 'JEdbd.TO^I20], I got inconsistent results from ek.get_timeseries() and ek.get_data(). Specifically, the former returns data while the latter returns NA. See detail below,
df = ek.get_timeseries(rics, start_date=dt.datetime(2020,3,25),
end_date=dt.datetime(2020,3,31))
df
JEdbc.TO^
I20JEdbd.TO^I20
HIGHCLOSELOWOPENCOUNTVOLUMEHIGHCLOSELOWOPENCOUNTVOLUMEDate
2020-03-252323.0016.5017.0189000017.0017.0016.9917.005190002020-03-262423.0220.0020.0032400017.2617.2617.0117.0151050002020-03-272622.0022.0025.001411700018.5018.5018.0018.006750002020-03-302018.0018.0020.0098700018.5018.5018.0018.005700002020-03-312020.0019.0119.0142900025.0025.0025.0025.00320000
df1, er = ek.get_data(rics, ['TR.PriceClose', 'TR.IssueMarketCap', 'TR.IssueMarketCap.Date'],
{'SDate':'2020-03-25', 'EDate':'2020-03-31'})
df1
Instrument Price Close Issue Market Cap Date
JEdbc.TO^I20 <NA><NA><NA>
JEdbd.TO^I20<NA><NA><NA>
Lastly, a call of get_timeseries() using package eikonapir in R results in errors:
get_timeseries(list('JEdbc.TO^I20', 'JEdbd.TO^I20'), list("*"),
start_date = '2020-03-25',
end_date = '2020-03-31')
# Error in 1:nrow(input_data_frame) : argument of length 0
I would highly appreciate if you could look into these inconsistencies and advise any suggestions/solutions.
Thanks,
TH
Best Answer
-
I am not familiar with R, but could you try named arguments like -
get_timeseries(rics = list('JEdbc.TO^I20', 'JEdbd.TO^I20'), fields = list("*"), start_date = "2020-03-25T00:00:00", end_date = "2020-03-31T00:00:00")
and see if that works. If it still does not, we can try to figure it out.
0
Answers
-
Hi @tta,
Please see this answer about the differences between get_data and get_timeseries api call. These both access a different backend service and the timeseries can only retrieve Open/High/Low/Close bar data.
The fields that you specified - TR.PriceClose, TR.IssueMarketCap are not available in Data Item Browser for this convertible debenture.
0 -
Thanks Gurpreet for pointing to the difference b/w get_data() and get_timeseries()!
What about the problem of get_timeseries() of eikonapir?
Thanks!
0 -
Surprisingly, it work!
I did not expect the function is such sensitive to its arguments.
Thanks a lot for your advice, highly appreciate it.
0 -
The problem with the get_timeseries call syntax for R in the original question is incorrect date format. get_timeseries function in eikonapir package is very inflexible with regard to the format of start_date/end_date inputs. According to the package documentation get_timeseries function strictly expects start_date and end_date as strings in "%Y-%m-%dT%H:%M:%S" format. The values provided in the original example are missing the time part.
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛