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
Also, for historical_pricing.summaries.Definition(), is there a way for the universe to take in ISINs directly?
Best 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=)
So we would need to get the chain constituents first using the following code:
from refinitiv.data.discovery import Chain
Chain('0#SGCHNAG0928=').constituentsWe 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:
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
0
Answers
-
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.
0 -
@wesley.ng ,Hi
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
0 -
@aramyan.h,Hi
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.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 556 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 652 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛