Refinitiv-data: No data to return

Hi,

I'm running the following chunk of code:

symbol_list = ['SG7LH6000009', 'SGXF67021638', 'SGXF65793287', 'SG7OI0000007', 'SGXF31305620', 'SGXF13486208', 'SGXF67857619', 'SGXF88972611', 'SGXF42837876', 'SGXF53577940', 'SG7T16943604', 'SGXF83009245', 'SG7IC4000008']
response = symbol_conversion.Definition(
    symbols= symbol_list,
    from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
    to_symbol_types=[
        symbol_conversion.SymbolTypes.RIC
    ],
).get_data()


response = historical_pricing.summaries.Definition(
    universe = list(response.data.df.RIC.values),
    interval = historical_pricing.Intervals.DAILY,          # Supported intervals: DAILY, WEEKLY, MONTHLY, QUARTERLY, YEARLY.
    count = 1,
    fields = ["BID", "ASK"]
).get_data()
# Extract in DataFrame format
response.data.df

This is the error message I'm getting:

RDError: Error code 1 | No data to return, please check errors: ERROR: No successful response. (TS.Interday.UserNotPermission.70112, User does not have permission for this universe), (TS.Interday.UserRequestError.70005, The universe is not found)

But the quotes are available on desktop, e.g. taking the first entry

SG7LH6000009

1680052661603.png

Also, for historical_pricing.summaries.Definition(), is there a way for the universe to take in ISINs directly?

Best Answer

  • aramyan.h
    aramyan.h admin
    Answer ✓

    Hi @wesley.ng ,


    Thank you for your question. When I look into the output of list(response.data.df.RIC.values) I see RIC chains there (eg 0#SGTEMKS0428=)

    screenshot-2023-03-29-at-101229.png

    So we would need to get the chain constituents first using the following code:

    from refinitiv.data.discovery import Chain
    Chain('0#SGCHNAG0928=').constituents

    We will get the following output as a result:

    ['SIMCDUMMY1', 'SIMCDUMMY5', 'SIMCDUMMY2', 'SGCHNAG0928=RRPS']

    After getting all the constituents we will get the following final RIC list:

    rics = ['SG7LH6000009=MKCP',
    'SGXF67021638=NMTW',
    'SGXF65793287=TE',
    'SIMCDUMMY1', 'SIMCDUMMY5', 'SIMCDUMMY2', 'SGTEMKS0428=RRPS',
    'SIMCDUMMY1', 'SIMCDUMMY5', 'SIMCDUMMY2', 'SGFCTLR0728=RRPS',
    'SIMCDUMMY1', 'SIMCDUMMY5', 'SIMCDUMMY2', 'SGCHNAG0928=RRPS',
    'SGXF67857619=TE',
    'SGXF88972611=MKCP',
    'SGXF42837876=MKCP',
    'SIMCDUMMY1', 'SIMCDUMMY5', 'SIMCDUMMY2', 'SGMAPIZ0329=RRPS',
    'SG7T16943604=GFGL',
    'SGXF83009245=TE',
    'SG7IC4000008=MKCP']

    And the historical pricing will return the following output:

    screenshot-2023-03-29-at-101713.png


    One observation I could make from the returned data frame is that from the chain constituents only the ones ending with =RRPS have actual BID/ASK values.

    Hope this helps, please let me know should you have any further questions.


    Best regards,

    Haykaz

Answers