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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
23 3 3 7

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonforexstreaming-prices
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
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 5.0 MiB each and 10.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
Click below to post an Idea Post Idea