Why CF_CURR does not return currency when asking same instrument via different types of identifier?

When I ask for CF_CURR via TICKER and ISIN, I get USD for ticker but NaN for ISIN.

identifiers = ['US03076C1062', 'AMP']

data, error = ek.get_data(identifiers, fields=['CF_CURR'])

Output:

Instrument CF_CURR

0 US03076C1062 None

1 AMP USD

Is this desired behaviour that I have to first convert all identifiers to RIC (even other data can be obtained via ISIN)?

Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @mzeman

    From my testing, it works with other fundamental fields, such as TR.CurrEnterpriseValueEV.

    image

    I assume that it doesn't work with CF_CURR because CF_CURR is in the Real-Time category.

    image

    Typically, we use RICs to subscribe to real-time data. If you check the raw output, you will see that it returns 'The record could not be found' for the instrument 'US03076C1062'.

    {'columnHeadersCount': 1,
     'data': [['US03076C1062', 28429632678.7, None],
      ['AMP', 28429632678.7, 'USD']],
     'error': [{'code': 251658243,
       'col': 2,
       'message': "'The record could not be found' for the instrument 'US03076C1062'",
       'row': 0}],
     'headerOrientation': 'horizontal',
     'headers': [[{'displayName': 'Instrument'},
       {'displayName': 'Current EV', 'field': 'TR.CURRENTERPRISEVALUEEV'},
       {'displayName': 'CF_CURR', 'field': 'CF_CURR'}]],
     'rowHeadersCount': 1,
     'totalColumnsCount': 3,
     'totalRowsCount': 3}

Answers

  • Hi @mzeman,

    RIC is the only acceptable identifier for use with Eikon API. If you inspect error object, it contains this message:

    [{'code': 251658243, 'col': 1, 'message': "'The record could not be found' for the instrument 'US03076C1062'", 'row': 0}]
  • Hello @mzeman

    You can use get_symbology(..) function which returns a list of instrument names converted into another instrument code e.g. ISIN is converted to RIC as an example below:

    aRIC = ek.get_symbology(["US03076C1062"], from_symbol_type="ISIN", to_symbol_type="RIC")
    aRIC

    image

  • That's not true. The answer from jirapongse.phuriphanvichai explains this problem and also provides an example that RIC is not only an acceptable identifier.

  • Thanks. I know this solution. I have already used it. However, it doesn't explain this problem. But jirapongse.phuriphanvichai explains it well.