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
15 5 8 11

How to get Close price of '.DXY' using get_data()?

Cannot access '.DXY' (DXY US DOLLAR CURRENCY INDEX) using get_data but get_timeseries() seems to work. It would be helpful to get it using get_data().

get_data throws NA values

ek.get_data('.DXY',fields = ['TR.CLOSEPRICE.date','TR.CLOSEPRICE'],parameters={'SDate':'2000-01-01','EDate':'2020-10-19','Frq':'D','CH':'Fd'})

get_timeseries() seems to work

ek.get_timeseries('.DXY',fields='CLOSE')
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.

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 11 27

Try field name TR.PriceClose instead of TR.CLOSEPRICE

ek.get_data('.DXY', ['TR.PriceClose.date','TR.PriceClose'], 
            {'SDate':'2000-01-01','EDate':'2020-10-19'})
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.

ek.get_data(['.MERH0A0','.MERC0A0','.MERG0Q0','.MERER00','.MEREG00','.MERWLCI'],fields = ['TR.PriceClose.date','TR.PriceClose'])

For these tickers TR.PriceClose doesn't seem to work, but TR.CLOSEPRICE does. Is there any way to get all prices using one TR function.

I'm afraid not. Or rather you could retrieve timeseries of close values for multiple instruments using get_timeseries method, but then you'll need to deal with 3K rows response limit, which I'm guessing is why you prefer to use get_data method.

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.