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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 1

TimeSeries in PythonAPI

I was trying to get time series data of Mid Close for some interest rate instruments through Python API but only to find that 'Close' and other fields in 'get_timeseries' are only available for 'Bid'. Is there any way to get Mid Close in forms of time series?

I also tried 'get_data', but not result was found under the field names that I have tried.

Here are the attemps I made, none of which has worked..

ek.get_timeseries('J1YSXOISL=TRDT',fields='CLOSE')#only bid is available

data = ek.get_data(['J1YSXOISL=TRDT'],['TR.MID_PRICE.Close'])#field does not exist

data = ek.get_data(['J1YSXOISL=TRDT'],['TR.ClosePrice.Value'])#field does not exist

And I would also like to confirm if all fields and parameters in Excel API are also available in Python API(or if the building of Python API is still in progress), especially the 'TimeZone' parameter in 'Parameters&Quick Functions.

Thanks in advance.

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apitime-series
fromexcelapi.png (48.6 KiB)
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.

1 Answer

Upvotes
Accepted
52.9k 136 44 63

There are two functions created by the Eikon Excel formula builder.

  • RHistory: Not all fields in RHistory are available in Eikon Data APIs (get_timeseries). Currently, Eikon Data APIs can only retrieve the default time-series view for any given RIC. For this RIC, the default time-series view is BID. Therefore, you are unable to get the MID_PRICE time-series view with Eikon Data APIs
  • TR: all fields in the TR function can be retrieved by the get_data method in Eikon Data APIs. Moreover, you can also apply parameters to the get_data method
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.

Where can I find the default time-series fields of rhistory for specific RICs?

@jirapongse.phuriphanvichai Thank you for your reply.

・For RHistory, is it decided when everything in RHistory will also be available in Eikon Data APIs.

・For TR, I managed to get Bid&Ask for RICs that have valid 'BIDPRICE' in excel function builder, which can be found in API with 'TR.BidPrice'. But for RICs like 'J1YSXOISL=TRDT ', whose valid field value in excel is 'CF_BID', could you please confirm the corresponding field in API. I tried a couple of times, but couldn't find anything working.

To retrieve all RHistrory fields with Eikon Data APIs, I will raise this requirement to the product team.

For the TR function, I can use get_data to retrieve CF_BID of J1YSXOISL=TRDT.

CF_BID is realtime data while TR.BIDPRICE is Time Series Data. From the Formula Builder, TR.BIDPRICE is not available for J1YSXOISL=TRDT.

1576135584987.png (11.5 KiB)

Thank you for the quick confirmation.

It was a bit confusing as I actually found 'BIDPRICE' under 'RealTime & Fundamentals' rather than 'TimeSeries' in function builder. But as you pointed out, it is possible to name start/end date for BIDPRICE while not for CF_Bid. So the current situation is that, in terms of Timeseries MidPrice, while get_timeseries is basically not to count on, some is possible through TR.BIDPRICE, but nothing works for RICs like J1YSXOISL=TRDT?

Will really appreciate it if the product team can look into this situation and find at least one way that covers all RICs.

Thank you.

Show more comments