why does the ld.get_data() not return anything for commodity options

Options

for example, ld.get_data('C430X25', fields=['EXPIR_DATE'])

I used item code from data item browser.

Many thanks

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @tim_hannon

    Thank you for reaching out to us.

    For me, it returns data properly.

    image.png

    You may need to enable the debug log by running the following code before opening a session.

    config = ld.get_config()
    config.set_param("logs.transports.file.enabled", True)
    config.set_param("logs.transports.file.name", "lseg-data-lib.log")
    config.set_param("logs.level", "debug")

    ld.open_session()

    With this code, the lseg-data-lib.log file will be created.

    Please remove any private information or credentials from the log file before sharing it. Once we have the log, we’ll be able to investigate the issue further.

  • tim_hannon
    tim_hannon Newcomer

    Hi, i believe session is definitely established as I can use other lseg.data.content functions well and ld.get_date() works well as the example shown in the github. See attached screenshot.

    image.png
  • tim_hannon
    tim_hannon Newcomer

    log for your reference:

    [2025-07-23T14:57:14.527798+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35824 - OpenUniverseStreams-Thread_0] - [_stream] - [_do_open] - _UniverseStream owner.id=0 id=5 name='C430X25' send open_message {"ID": 5, "Domain": "MarketPrice", "Streaming": false, "Key": {"Name": "C430X25"}, "View": ["EXPIR_DATE"]}[2025-07-23T14:57:14.527893+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35824 - OpenUniverseStreams-Thread_0] - [stream_connection] - [send_message] - [OMMSTREAMING_PRICING_0.0] send {"ID": 5, "Domain": "MarketPrice", "Streaming": false, "Key": {"Name": "C430X25"}, "View": ["EXPIR_DATE"]}[2025-07-23T14:57:14.528236+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35824 - OpenUniverseStreams-Thread_0] - [_stream] - [_do_open] - _UniverseStream owner.id=0 id=5 name='C430X25' wait open event[2025-07-23T14:57:14.696783+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [19568 - ThreadOMMSTREAMING_PRICING_0.0] - [stream_connection] - [_on_message] - [OMMSTREAMING_PRICING_0.0] on_ws_message [{"ID": 5, "Type": "Status", "Key": {"Service": "ELEKTRON_DD", "Name": "C430X25"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "Access Denied: User req to PE(4927)"}}][2025-07-23T14:57:14.697015+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [19568 - ThreadOMMSTREAMING_PRICING_0.0] - [stream_connection] - [_on_message] - [OMMSTREAMING_PRICING_0.0] queued with priority 4: {"ID": 5, "Type": "Status", "Key": {"Service": "ELEKTRON_DD", "Name": "C430X25"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "Access Denied: User req to PE(4927)"}}[2025-07-23T14:57:14.697158+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [7288 - Msg-Proc-ThreadOMMSTREAMING_PRICING_0.0] - [omm_stream_connection] - [_process_message] - [OMMSTREAMING_PRICING_0.0] process message {"ID": 5, "Type": "Status", "Key": {"Service": "ELEKTRON_DD", "Name": "C430X25"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "Access Denied: User req to PE(4927)"}}[2025-07-23T14:57:14.697280+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [7288 - Msg-Proc-ThreadOMMSTREAMING_PRICING_0.0] - [_omm_cxn_listeners] - [callback] - _UniverseStream owner.id=0 id=5 name='C430X25' open event is set in StatusOMMListenerUniverseStm[2025-07-23T14:57:14.697441+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [7288 - Msg-Proc-ThreadOMMSTREAMING_PRICING_0.0] - [_omm_cxn_listeners] - [callback] - _UniverseStream owner.id=0 id=5 name='C430X25' open event is set in StatusOMMListenerUniverseStm[2025-07-23T14:57:14.697523+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35824 - OpenUniverseStreams-Thread_0] - [_basestream] - [transition_to] - _UniverseStream owner.id=0 id=5 name='C430X25' transition OpeningOMMStreamSt -> OpenOMMStreamSt[2025-07-23T14:57:14.697564+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [7288 - Msg-Proc-ThreadOMMSTREAMING_PRICING_0.0] - [stream_connection] - [_get_messages] - [OMMSTREAMING_PRICING_0.0] received messages: 1 | processed messages: 1[2025-07-23T14:57:14.698405+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35728 - MainThread] - [_universe_streams] - [open_streams] - MixedStreams id=0 universe=['C430X25'] end open ['C430X25'][2025-07-23T14:57:14.698602+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35728 - MainThread] - [_basestream] - [transition_to] - MixedStreams id=0 universe=['C430X25'] transition OpeningUniverseStreamsSt -> OpenUniverseStreamsSt[2025-07-23T14:57:14.698768+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35728 - MainThread] - [_basestream] - [close] - MixedStreams id=0 universe=['C430X25'] state=OpenUniverseStreamsSt close [2025-07-23T14:57:14.698877+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35728 - MainThread] - [_basestream] - [transition_to] - MixedStreams id=0 universe=['C430X25'] transition OpenUniverseStreamsSt -> CloseUniverseStreamsSt[2025-07-23T14:57:14.698966+10:00] - [sessions.platform.kev-session.0] - [DEBUG] - [35728 - MainThread] - [_universe_streams] - [_do_close] - MixedStreams id=0 universe=['C430X25'] start close

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    It is a permission issue.

    - [_on_message] - [OMMSTREAMING_PRICING_0.0] on_ws_message [{"ID": 5, "Type": "Status", "Key": {"Service": "ELEKTRON_DD", "Name": "C430X25"}, "State": {"Stream": "Closed", "Data": "Suspect", "Code": "NotEntitled", "Text": "Access Denied: User req to PE(4927)"}}][2025-07-23T14:57:14.697015+10:00] -

    You can try this delayed RIC (/C430X25) instead.

     ld.get_data('/C430X25', fields=['EXPIR_DATE'])
    
  • tim_hannon
    tim_hannon Newcomer
    edited 5:42AM

    yes, it works. many thanks!