Workspace/Eikon Python API: CF_ fields available for one login but not for another

Hello,

When we run the following get_data query in Python using one login, we receive data but with another login no data comes up:

rd.get_data('0005.HK', fields=['CF_CLOSE', 'CF_CURR', 'CF_BID', 'CF_ASK'])

Support team has no idea why this is the case and suggested to ask here.

Anyone has any idea why?

Thanks in advance!

Best Answer

  • Jirapongse
    Answer ✓

    @cleesikyee

    You may use other TR fileds instead, such as TR.TPEstCurrency.

    1715071170559.png

    rd.get_data('/0005.HK', fields=['CF_CLOSE', 'CF_CURR', 'CF_BID', 'CF_ASK',"TR.TPEstCurrency"])

    However, you need to contact the helpdesk team direclty via MyRefinitiv to verify if this field can be used.


Answers

  • @cleesikyee

    Thank you for reaching out to us.

    To verify what the problem is, you need to enable the debug log in the library by using the following code.

    import refinitiv.data as rd
    rd.get_config()["logs.level"] = "debug"
    rd.get_config()["logs.transports.file.enabled"] = True
    rd.get_config()["logs.transports.file.name"] = "refinitiv-data-lib.log"
    rd.open_session()

    With the code, the refinitiv-data-lib.log will be created. Please share this file when the problem occurred.

    Typically, it could be permission issues, if you use different accounts.

  • Hello,

    Here is the file

    20240419-1236-52980-refinitiv-data-lib.zip

    What permission would need to be activated?

    Thanks.

  • @cleesikyee

    I checked the log file and found that the accout doesn't have permission to access real-time data of 0005.HK.

    [2024-04-19T12:36:57.405107+08:00] - [sessions.desktop.workspace.0] - [DEBUG] - [56784 - ThreadOMMSTREAMING_PRICING_0.0] - [stream_connection] - [_on_message] - [OMMSTREAMING_PRICING_0.0] on_ws_message [{"ID": 5, "Type": "Status", "Key": {"Service": "IDN_FD3", "Name": "0005.HK"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "Access Denied: User req to PE(4945)"}}]

    Please contact your LSEG account team or sales team directly to verify the permission. Otherwise, you can use delayed RICs (/0005.HK) instead.

    rd.get_data('/0005.HK', fields=['CF_CLOSE', 'CF_CURR', 'CF_BID', 'CF_ASK'])


  • Thanks a lot @Jirapongse !

    Would you know also for the CF_CURR field using the refinitiv.data API, how to get the actual currency code instead of the number value? Ex: HKD for 344.