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
87 10 13 14

Getting currency code for a security

When I request the currency of a RIC like DTEGn.DE using the Eikon Data API using Python (streaming MarketPrice domain), I don't get back the ISO code (EUR) but a number (978). How can I translate this into the ISO currency code string?

Similar problems are found with other fields, e.g. CF_EXCHNG for the name of the exchange the security is traded on.

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apiforexstreaming-prices
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
3.8k 4 4 6

Hi @GoGoGroundhog

The logic of enumerated values you find in the enumtype.def file that can be located in the default Thomson Reuters Eikon location:

\AppData\Local\Thomson Reuters\Eikon User\Cache\UUID\PersistentFiles\Config\RealTime

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.

Thanks. How can I programmatically derive the UUID to be included in the above path?

@GoGoGroundhog

Try this:

from winreg import *
import xml.etree.ElementTree as ET

registry = ConnectRegistry(None, HKEY_CURRENT_USER)
rawkey = OpenKey(registry, r"Software\Thomson Reuters\DumpUploader")
val = QueryValueEx(RawKey, "FilePath")[0]

root1 = ET.parse(val.split("LibraryCache")[0] + "LMO.LatestUserAccount.xml").getroot()

enumtype = val.split("LibraryCache")[0] + (root1.attrib['uuid'] + r"\PersistentFiles\Config\RealTime\Display Templates" + r"\enumtype.def")


Thanks, works fine.

Show more comments

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.