'get_data' returns different results when 'end date' is not specified
Please take a look at the following two requests. First:
df1, err =eikon.get_data('CRH.L', ["TR.CAEffectiveDate","TR.CAAdjustmentFactor"],{"SDate":"20030101","EDate":"20180520", "Scale": 6,"FRQ": "D"})
The output is:
Second, when leaving the 'end date' out:
df2, err=eikon.get_data('CRH.L', ["TR.CAEffectiveDate","TR.CAAdjustmentFactor"],{"SDate":"20030101","Scale": 6,"FRQ": "D"})
The output is:
The second one is completely different and not correct. Can this be fixed please? Thanks!
Best Answer
-
@Joris.Hoendervangers
I'm not convinced the result you got is unexpected. As far as I can see for capital change history when you specify only one of the SDate or EDate parameters the service interprets the SDate as the near date and EDate as the far date relative to today. So, when you only provide SDate the service returns the events that occurred prior to the SDate. And when you only provide EDate it returns the events that occurred since the EDate. In your example when you only provide SDate the service returned the only capital change event this stock had prior to 01-Jan-2003, which happened in 2001.0
Answers
-
Thanks Alex. Changing SDate to EDate in the second request gives indeed the same output as the first request. I would think of 'start date' in calendar days rather than relative to today. Perhaps a bit confusing for some...
0 -
It is unfortunate that the API documentation for get_data does not even mention the two parameters SDate and EDate: https://docs-developers.refinitiv.com/1592335675449/14684/book/en/eikon/index.html#get_data
0 -
They're not mentioned because they're not arguments of get_data method. The keyword argument of get_data method, where these parameters may sometimes be utilized, is "parameters", which is indeed mentioned in the documentation for get_data method you referenced. Just like the field names you can utilize in the "fields" keyword argument of get_data method, SDate and EDate parameters are part of the metadata for Eikon Data APIs. Due to sheer size of this metadata (tens of thousands of fields, each with its own set of applicable parameters), it is impossible to include the metadata in the docstrings for get_data method. To learn how to go about metadata discovery for use with Eikon Data APIs, see this tutorial. We recently introduced a new app in Eikon named CodeCreator. This app greatly simplifies the task of writing code for data retrieval expressions, as it introduces the capability to create code snippets, which you can copy & paste into your IDE, into content discovery tools.
0 -
Hi @sdittmar
You can refer to this tutorial on "Data Item Browser" tool.
The API document mentions about using this "Data Item Browser" tool to find the supported parameters.
0 -
Thank you both for your helpful input! The CodeCreator is great tool to know, good work!
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 162 App Studio
- 4 Block Chain
- 5 Bot Platform
- 17 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
- 370 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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛