how to use eikon api to get bond info via bond Shenzhen code?
Shenzhen Code: 133275;
Bond info: Bond name, ISIN, Current Coupon, Coupon Type, Maturity Date and etc.
Best Answer
-
Thank you for reaching out to us.
For this code, you can also use Refinitiv Data Library to search for RIC of this code.
df = rd.discovery.search(
view = rd.discovery.Views.FIXED_INCOME_INSTRUMENTS,
top = 10,
filter = "LocalCodesLocalScheme eq 'SHZ:133275'",
select = "BusinessEntity,DocumentTitle, RIC, ISIN, MaturityDate,CouponType"
)
dfYou can use the following code to get the list of fields in the FIXED_INCOME_INSTRUMENTS view.
from refinitiv.data.content import search
response = search.metadata.Definition(
view = search.Views.FIXED_INCOME_INSTRUMENTS
).get_data()
response.data.df0
Answers
-
@Jirapongse Thanks for your reply.
I found that the filter "filter = "LocalCodesLocalScheme eq 'SHZ:133275'"" is different from "filter = "(LocalCode eq '175143')"". Is there a common filter to search for and is suitable for all different regions in the world?
0 -
My colleague @marcin.bunkowski01 found out that we can use these codes directly with the get_data method to get bond information. For example:
rd.get_data(['133275','175143'],['TR.FIIssuerName','TR.FIMaturityDate','TR.FICouponType','TR.FICouponTypeDescription'])
The output is:
You can use the Data Item Browser tool to search for availble fields.
1 -
@Jirapongse we tried the bond code="123205", and we cannot use rd.get_data method to get the RIC code. it returns empty. Please help to find the reason, thank you.
0 -
Please try the TR.PreferredRIC field.
rd.get_data(['133275','175143','123205'],
['TR.FIIssuerName','TR.FIMaturityDate','TR.FICouponType','TR.FICouponTypeDescription','TR.PreferredRIC'])0 -
@Jirapongse Could we use this method to search for fund and stock RIC code?
e.g. fund code: China Code FE = '006038' ;
(detailed information: RIC code= 'LP68497266')
stock code:301048;
(detailed information: RIC code= '301048.SZ')
I cannot attach the pictures on the comment. So I write the ric code for your reference.
0 -
I tired several fields that can provide RICs.
rd.get_data(['133275','175143','123205','006038','301048'],
['TR.FIIssuerName','TR.FIMaturityDate','TR.FICouponType','TR.FICouponTypeDescription',
'TR.PreferredRIC','TR.RIC','TR.LipperRICCode','TR.PrimaryIssueRICCode','TR.FundHoldingRIC'])The output is:
You can contact the Eikon Excel support team directly via MyRefinitiv and ask for fields that can provide the required data. Typically, the fields used with the TR function in Eikon Excel can also be used with the get_data method.
0 -
@Jirapongse thanks, that works.
I'd like to ask another questiones.
1. Could we use rd.ger_data method to get the ric code for the type of fund asset? E.g. China Code EF = '006038'?
0 -
2. Could we use rd.ger_data method to get the ric code for the type of stock asset? E.g. Stock code = '301048'?
0 -
@Jirapongse sorry to bother you again. Since we don't have the license to retrieve the real time data, we cannot use the TR function.
And I find that the result of the fond asset "006038" is not the asset we want. TR.FundName should be 'Dacheng JingHeng Mixed Fund C'.
Does this mean we cannot use '006038' code to retrieve data?
0 -
In this case, you can get a RIC from search.
df = rd.discovery.search(
view = rd.discovery.Views.FUND_QUOTES,
top = 10,
filter = "LocalFundCode eq '006038'",
select = "BusinessEntity,DocumentTitle, RIC,LocalFundCode"
)
df0 -
@Jirapongse Thanks for your reply. How to search the multiple code by using this search function? E.g. '006038', '012728'.
0 -
@xuke
You can use the 'or' or 'in' operator.df = rd.discovery.search(
view = rd.discovery.Views.FUND_QUOTES,
top = 10,
filter = "LocalFundCode in ('006038' '012728')",
select = "BusinessEntity,DocumentTitle, RIC,LocalFundCode"
)
dfdf = rd.discovery.search(
view = rd.discovery.Views.FUND_QUOTES,
top = 10,
filter = "LocalFundCode eq '006038' or LocalFundCode eq '012728'",
select = "BusinessEntity,DocumentTitle, RIC,LocalFundCode"
)
df0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 370 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛