Retrieve PAR_AMT field from Refinitiv Eikon API via Phyton

Dear support, I'm trying to recover the PAR_AMT field from Refinitiv Eikon API using Phyton as language. I could recover any record by using the instrument ISIN code as input. Thus, as suggested by Refinitiv support, I try to retrieve the RIC Code to be used as input to query the PAR_AMT field, but the result is the following:
I have access to the field, as confirmed by Refinitiv support. Below you can find an example of the code I'm using to recover the RIC Code:
# ======== First Demo Script ========
import eikon as ek
import refinitiv.dataplatform as rdp
from rich import print
from refinitiv.dataplatform.factory.content_factory import ContentFactory
rdp.open_platform_session(
app_key='***',
grant=rdp.GrantPassword(
'***',
'***'
)
)
df = rdp.get_data(
universe=['EU000A3JZR92', 'BE0312794663', 'ARARGE03E113'],
fields=['TR.PreferredRIC']#, 'TR.HeadquartersCountry']
)
#print(df)
#print(ContentFactory._last_result)
response: rdp.content.data_grid._response.FundamentalResponse = ContentFactory._last_result
print('\n\n',response.data.raw,'\n\n')
"""
RESULT
{'error': {'code': 221, 'description': 'The access to field(s) denied.', 'content': ...}}
"""
# ======== Second Demo Script ========
import eikon as ek
ek.set_app_key('***')
isin = ['EU000A3JZR92', 'BE0312794663', 'ARARGE03E113']
data, error = ek.get_data(isin, ['TR.PreferredRIC'])
print(
'data: ', data,
'\n\n\nerror: ', error
)
"""
RESULT
Failed to decode response to json: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>Sign In</title><...
*****************************
Could you help me further please?
Thanks,
Sergio
Best Answer
-
Hi @s.bariatti ,
I believe, to convert ISIN to RIC you need to use symbology conversion functions. I would suggest using our latest Refinitiv Data Libraries for Python for such queries. Below is an example of such conversion:
response = symbol_conversion.Definition( ['EU000A3JZR92', 'BE0312794663', 'ARARGE03E113']).get_data()
response.data.dfYou can also specify some conversion parameters like below:
response = symbol_conversion.Definition(
symbols=['EU000A3JZR92', 'BE0312794663', 'ARARGE03E113'],
from_symbol_type=symbol_conversion.SymbolTypes.ISIN,
to_symbol_types=[
symbol_conversion.SymbolTypes.RIC,
symbol_conversion.SymbolTypes.OA_PERM_ID
],
).get_data()
response.data.dfFinally yoy can use rd.get_data function to get PAR_AMT:
rd.get_data(['XS268996907=', 'BE79466=', 'ARDICA='], fields = 'PAR_AMT')
Hope this helps.
Best regards,
Haykaz
0
Answers
-
Thanks for the answer.
I'm currently not using the python package Refinitive but instead I'm using the python package Eikon, could you share an example with Eikon?
Also, could you confirm that by using Eikon or Refinitive or directly using the API via the 'Requests' package there are no differences in terms of product availability?
0 -
Hi @s.bariatti ,
This is the equivalent code for Eikon
ek.get_symbology(
['EU000A3JZR92', 'BE0312794663', 'ARARGE03E113'],
# from_symbol_type='ISIN',
# to_symbol_type='RIC'
)However it didn't return RIC for your instruments, that is why I suggested using RD libraries. Please try with RD and let me know if any issues. You should have access to that as well. In the meantime I will raise a content query to our helpdesk on behalf of you re the Eikon
Best regards,
Haykaz
0 -
0
-
Hello,
I tried and use the following script to retrieve PAR_AMT using Refinitiv API:
rd.get_data(['XS268996907=', 'BE79466=', 'ARDICA='], fields = 'PAR_AMT')
Result is the following error message:
"No user scope for key=/streaming/pricing/v1/, method=GET.
Insufficient Scope. Cannot load the list of associated URLs from https://api.refinitiv.com/streaming/pricing/v1/ for apis.streaming.pricing.endpoints.main endpoint.
refinitiv.data._errors.RDError: Error code -1 | Error code -1 | Insufficient scope for key=/streaming/pricing/v1/, method=GET.
Required scopes: {'trapi.streaming.pricing.read'}
Available scopes: {'trapi.graphql.subscriber.access', 'trapi.user-framework.workspace.crud', 'trapi.data.historical-pricing.summaries.read', 'trapi.auth.cloud-credentials', 'trapi.streaming.prcperf.read', 'trapi.messenger', 'trapi.data.get.data.read', 'trapi.synthetic.crud', 'trapi.user-framework.mobile.crud', 'trapi.alerts.history.crud', 'trapi.frtb.sentimarization', 'trapi.searchcore.lookup.read', 'trapi.search.read', 'trapi.alerts.subscription.crud', 'trapi.alerts.preferences.crud', 'trapi.searchcore.read', 'trapi.search.metadata.read', 'trapi.data.quantitative-analytics.read', 'trapi.search.lookup.read', 'trapi.data.average-volume-analytics.ava_read', 'trapi.user-framework.recently-used.crud', 'trapi.sdbold', 'trapi.alerts.publication.crud', 'trapi.data.historical-pricing.events.read', 'trapi.searchcore.metadata.read', 'trapi.streaming.synthetic.read', 'trapi.search.explore.read', 'trapi.data.benchmark.bmk_read', 'trapi.user-framework.application-metadata.raplib'}
Missing scopes: {'trapi.streaming.pricing.read'}"
Can you look into it please?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 中文论坛