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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 5

Python API get_timeseries returning values

Hi,

I want to get historical prices of "WIPLNOND=" and "PLN6X12F=" instruments. The "get_data" function works fine, but it returns only one record. In this case I tried "get_timeseries" function, but it returns <NA> values. I've checked instruments fields in Data Item Browser and TR.ASKPRICE / TR.MIDPRICE are available in Time Series and are not blank.

My code:

df, err = ek.get_data("PLN6X12F=",["TR.MIDPRICE", "TR.MIDPRICE.Timestamp"])
df = ek.get_timeseries("WIPLNOND=",fields=['TR.ASKPRICE', 'TR.ASKPRICE.Timestamp'])
df = ek.get_timeseries("PLN6X12F=",["TR.MIDPRICE", "TR.MIDPRICE.Timestamp"], interval='hour')

Output (example):

1626090203728.png

1626089903750.png

I've checked similar forum questions like this, but couldn't find a solution. How should my "get_timeseries" input look like?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
1626090203728.png (2.9 KiB)
1626089903750.png (11.6 KiB)
icon clock
10 |1500

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

Upvotes
Accepted
4.3k 2 4 5

Hi @rafal.belka ,

get_timeseries returns a limited field list ('TIMESTAMP', 'VALUE', 'VOLUME', 'HIGH', 'LOW', 'OPEN', 'CLOSE' and 'COUNT') whereas you can request almost all TR fields with get_data, including historic within a rnage of dates.

Please, refer to the answer in this post : https://community.developers.refinitiv.com/questions/66338/can-eikon-data-api-support-the-sdate-and-edate-par.html

icon clock
10 |1500

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

Upvote
18k 21 12 20

Hi @rafal.belka

Alternatively, you can use RDP Library.

Please try the code below:

ahs1.png

You can use help(rdp.get_historical_price_summaries) to see the function-supported parameters such as start, end, fields, count, etc...


ahs1.png (38.3 KiB)
icon clock
10 |1500

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

Click below to post an Idea Post Idea