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.

Best Answer

  • 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

Answers

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

  • Can you please explain how to handle enumtype.def values where "DISPLAY" is not a quoted string, but a hex number enclosed in # characters?

    I already researched, that enum values enclosed in “#” are apparently hex characters encoded in Reuters Multi-Lingual Text Encoding Standard (RMTES). Is there a definition of RMTES somewhere so I can write parser/converter? I am using C#, by the way.

  • Can you please explain how to handle enumtype.def values where "DISPLAY" is not a quoted string, but a hex number enclosed in # characters?

    I already researched, that enum values enclosed in “#” are apparently hex characters encoded in Reuters Multi-Lingual Text Encoding Standard (RMTES). Is there a definition of RMTES somewhere so I can write parser/converter? I am using C#, by the way.