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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 1

Using the Python API, How do I retrieve the last price on an equity converted to US Dollars?

I tried:

ek.get_data(["9501.T", "1810.HK","SAF.PA"], ['CF_LAST', 'TR.PriceClose(curn=USD)'])

That gives me the last price in the local currency, and the closing price in USD. But, I want the last price in USD. When I try: CF_LAST(curn=USD), I get the message: "The 'CURN' is unrecognized."

Also, where do I find a guide that shows the names of the data values I can query for a ticker?

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.

Upvotes
Accepted
18k 21 12 20

Hi @Brent Gregory

The "CF_LAST" is a realtime field, it only reports in local currency.


You can try retrieving currency value and apply it to the CF_LAST in the application.

df,e = ek.get_data('HKD=','CF_LAST')
df1,e = ek.get_data('1810.HK','CF_LAST')
df1['CF_LAST_USD'] = df1['CF_LAST'] * df['CF_LAST'][0]
df1


ahs1.png (58.6 KiB)
ahs2.png (3.5 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
3 0 0 1
This cleared up the issue. Thanks for the help. Brent
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