Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 4

Time Series retrieval using Python API shows NaN as result

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

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
icon clock
10 |1500

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

Upvote
Accepted
3.8k 4 4 6

Hi @John Altair.Bautista

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.

icon clock
10 |1500

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

Thanks Marcin!

Upvotes
36 4 4 10

@marcin.bunkowski

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

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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