Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
REFINITIV
Question by Joris.Hoendervangers · May 24, 2018 at 04:03 AM · eikon data apiget_datadatesend date

'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!

df1.jpg (10.1 KiB)
df2.jpg (8.3 KiB)

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Reply

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Alex Putkov. · May 25, 2018 at 06:35 PM

@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.

Comment

People who like this

0 Show 5 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Joris.Hoendervangers · May 28, 2018 at 05:46 AM 0
Share

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...

avatar image
sdittmar · Aug 06, 2020 at 02:44 PM 0
Share

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

avatar image
REFINITIV
Alex Putkov. ♦♦ sdittmar · Aug 06, 2020 at 03:21 PM 0
Share

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.

avatar image
sdittmar Alex Putkov. ♦♦ · Aug 07, 2020 at 02:46 PM 0
Share

Thank you both for your helpful input! The CodeCreator is great tool to know, good work!

avatar image
REFINITIV
chavalit.jintamalit ♦♦ sdittmar · Aug 06, 2020 at 03:22 PM 0
Share

Hi @sdittmar

You can refer to this tutorial on "Data Item Browser" tool.

https://developers.refinitiv.com/eikon-apis/eikon-data-api/learning?content=14707&type=learning_material_item


The API document mentions about using this "Data Item Browser" tool to find the supported parameters.


ahs.png (116.3 KiB)

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
10 People are following this question.

Related Questions

call to get_data returns either open interest data or other fields data but not all at the same time

Eikon Data API consistency across get_data and get_timeseries

Multiple values of parameters in eikon.get_data query (Codebook, Python)

Getting CA.C fields via Eikon Data API

get_data returning only 1 row even after adding start date and end date

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges