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
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-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.

<AHS only>

discussed with helpdesk, case no. 09026545

@Brent Gregory

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
18.2k 21 13 21

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 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

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.