For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
I am using the eikon python api to extract some data.
I am doing the below:-
ek.get_timeseries(["912828N30="],
["TR.YieldToMaturityAnalytics"],
start_date="2018-10-09",
end_date="2018-10-10")
I get NaN for all the dates.
However, I can extract the same data via excel api as below:-
TR("912828N30","TR.YieldToMaturityAnalytics(ValuationDate=#1)",,E2,D2)
where D2 is set to the dates : 2018-10-09 and 2018-10-10
To replicate Eikon Excel in Python API you need to use syntax below:
RICS = ['912828N30']
fields = ['TR.YieldToMaturityAnalytics(ValuationDate=2018-10-09)']
df,err = ek.get_data(RICS,fields)
df
It is not possible to retrieve timeseries for this data item in a single call in Eikon Excel. Please check the syntax as most probably cell E2 is the destination cell of the output.
Confusingly, this only works when using the `eikon` package, and not when using the refinitiv-dataplatform package. See the question I posted here: https://community.developers.refinitiv.com/questions/89649/get-data-api-gives-different-results-in-refinitivd.html