question

Upvotes
Accepted
4 4 7 11

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?

#technologyrefinitiv-data-libraries
1680052661603.png (33.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvote
Accepted
4.2k 11 2 7

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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi Haykaz,


I tried your solution, which required me to update the refinitiv-data package, and now I'm getting the following error instead:

ScopeError: Error code -1 | Insufficient scope for key=/discovery/search/v1/lookup, method=POST failed. Required scope: {'trapi.search.read', 'trapi.search.lookup.read'} Token scope: {'trapi.cfs.claimcheck.read', 'trapi.data.historical-pricing.events.read', 'trapi.data.symbology.read', 'trapi.graphql.subscriber.access', 'trapi.search.explore.read', 'trapi.metadata.read', 'trapi.auth.cloud-credentials', 'trapi.data.symbology.advanced.read', 'trapi.data.historical-pricing.summaries.read', 'trapi.search.lookup.read', 'trapi.search.metadata.read'} Missing scopes: {'trapi.search.read'}

Is this something to be resolved by my account manager? Thanks.

Hi @wesley.ng ,


Right, this is most probably a permissioning issue as I can get the data on my end. So please raise this to your account manager.


Best regards,

Haykaz

Hi @h.aramyan01,

We have been made aware that this Chain module is basically inaccessible to the RDP API via the 'platform' as opposed to the 'desktop.session'. Could you please provide a workaround, for mapping ISINs to all available RICS and the constituents of its chain to allow me to get historical pricing?

Many thanks.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.