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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 2 0

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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.

1 Answer

Upvotes
Accepted
39.2k 75 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 5.0 MiB each and 10.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.

Click below to post an Idea Post Idea