rdp search returns nothing

Hi, I am using rdp.open_desktop_session in Python (IntelliJ Ultimate; rdp.version 1.0.0a7.post7) and running following :
baseString1 = "DerivedCategory eq 'BOND' and startswith( IssuerLegalName, 'CREDIT SUISSE' ) and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
baseString2 = "DerivedCategory eq 'BOND' and startswith( CommonName, 'CREDIT SUISSE' ) and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
srchfields = "RIC,ISIN, FullName, CommonName,CompanyName, SeniorityType,NativeIdentifier,DerivedCategory,OriginalIssueCurrency,ParentIndustrySector, CouponCurrency, CouponTypeDescription"
GroupSize = 5000
data1 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString1, top=GroupSize, select=srchfields)
data2 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString2, top=GroupSize, select=srchfields)
to get:
data1
data2
Out[13]:
Empty DataFrame
Columns: []
Index: []
A) On top of that, I have a lot of Banks to loop over. What is the best strategy? Do I use the IssuerLegalName ?
Also, in Excel API, I could use the RIC or PermId of the Bank. What is the equivalent for PermId here? By the way, search using RIC does not seem to work.
basestringRIC = "DerivedCategory eq 'BOND' and RIC eq 'UBSG.S' and OriginalIssueCurrency eq 'USD' and ISIN ne null"
srchfields = "RIC,ISIN, FullName, CommonName,CompanyName, SeniorityType,NativeIdentifier,DerivedCategory,OriginalIssueCurrency,ParentIndustrySector, CouponCurrency, CouponTypeDescription"
GroupSize = 5000
dataUBS = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=basestringRIC, top=GroupSize, select=srchfields)
This returns:
dataUBS
Out[16]:
Empty DataFrame
Columns: []
Index: []
Thanks
P.S.
this returns nothing in my case (It is being taken care of on a separate thread).
df = rdp.get_search_metadata(view = rdp.SearchViews.GovCorpInstruments)
Best Answer
-
I would highly recommend you use the:
response = rdp.Search.search()
syntax when building out your search expressions. The syntax you are using is a convenient, simple syntax that returns a dataframe. The libraries are layered to provide more granular details - the syntax above is the API call at the content layer of the library.
When I ran your first example 'baseString1', it failed because the startswith only accepts properties supporting exact match:
What you can do instead is perhaps use the organization ID (Perm ID) for Credit Suisse to return the list of bonds. Below is an updated filter that provides this. I also included a couple of other conditions around the status, i.e whether the bond is active and whether it has matured.
filterStr = "DerivedCategory eq 'BOND' and ParentOAPermID eq '4295890672' and \
IsActive eq true and AssetStatus ne 'MAT' and \
OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"Apply the above filter, I received a total of 5456 rows.
0
Answers
-
On PermID I tried following:
srchfields = "RIC,ISIN, FullName, CommonName,CompanyName, SeniorityType,NativeIdentifier,DerivedCategory,OriginalIssueCurrency,ParentIndustrySector, CouponCurrency, CouponTypeDescription, IssuerLegalName"
GroupSize = 5000
basestringPermID = "DerivedCategory eq 'BOND' and PermID eq '4295890710' "
data_PermID = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=basestringPermID, top=GroupSize, select=srchfields)
#also tried:
basestringPermID = "DerivedCategory eq 'BOND' and PermID eq '5000804106' "Both basestringPermID returned nothing.
0 -
I believe that your filter does not work as expected.
baseString1 = "DerivedCategory eq 'BOND' and startswith( IssuerLegalName, 'CREDIT SUISSE' ) and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
baseString11 = "DerivedCategory eq 'BOND' and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
baseString2 = "DerivedCategory eq 'BOND' and startswith( CommonName, 'CREDIT SUISSE' ) and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
baseString22 = "DerivedCategory eq 'BOND' and OriginalIssueCurrency eq 'USD' and RIC ne null and ISIN ne null"
srchfields = "RIC,ISIN, FullName, CommonName,CompanyName, SeniorityType,NativeIdentifier,DerivedCategory,OriginalIssueCurrency,ParentIndustrySector, CouponCurrency, CouponTypeDescription"
GroupSize = 50
data1 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString1, top=GroupSize, select=srchfields)
data11 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString11, top=GroupSize, select=srchfields)
data2 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString2, top=GroupSize, select=srchfields)
data22 = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=baseString22, top=GroupSize, select=srchfields)I added data11 and data22 which remove "and startswith( IssuerLegalName, 'CREDIT SUISSE' )" from your filter and it returned the result.
0 -
You can refer to this sample, https://github.com/Refinitiv-API-Samples/Example.RDPLibrary.Python.Search
Please see rdp.get_search_metadata(views)
You can use any fields which "Searchable" is true.
0 -
If you haven't had a chance, I would take a look at this Search Article. It will provide you with some helpful hints and tricks to figure out how to build out your search criteria.
0 -
chavalit.jintamalit Hi, well the point is that I wanted on purpose to retrieve data for given Bank and I wanted to repeat this procedure for a whole lot of Banks. Can you please reconsider your answer to take into account this?
Also, importantly I need to have a way to specify the names of the Banks in rdp space. I do have a list with names from EIKON GUI, but is there an attribute reflecting a Bank name that is valid across EIKON tools? (from GUI to dataplatform? I was thinking of IssuerLegalName or RIC or PermID but I need something that works for all cases. RIC and PermID do not seem to work in data platform e.g.)
Regarding rdp.get_search_metadata see P.S. section of my original e-mail where I say that this does not work for me in IntelliJ. In the meanwhile I found out that it works on CODEBK but I can only inspect it on that platform. Thanks
0 -
Can you please reconsider your answer to take into account this?
Please review Nick's sample filter.(using PermID)
Regarding rdp.get_search_metadata - it works on CODEBK
I know that this is not perfect, you can use CODEBOOK to get metadata and export them to csv or excel file.
df = rdp.get_search_metadata(view = rdp.SearchViews.GovCorpInstruments)
df.to_excel('gov-metadata.xlsx')Then you can download the exported file and see the fields on your local machine.
0 -
@ nick.zincone.1 · Many thanks for the hint regarding the PermID (that works nicely) and for the link with info.
0 -
by the way why does the below does not work? I took the "A:C9" from the
navigators = "RCSCouponTypeGenealogy"
# does not work:
filterStr = " DerivedCategory eq 'BOND' and IsActive eq true and AssetStatus ne 'MAT' and endsWith(RCSCouponTypeGenealogy, 'A:C9' ) and ParentOAPermID eq '4295890672'"
srchfields = "RIC,ISIN, FullName, InstrumentTypeDescription, RCSCouponTypeGenealogy"
data_PermID = rdp.search(view=rdp.SearchViews.GovCorpInstruments, filter=filterStr, top=GroupSize, select=srchfields)Thanks.
0 -
The 'endsWith' should be 'endwith' (all lowercase).
Remember the advice above, don't use:
response = rdp.search()
when building out your search algorithm. Instead use:
response = rdp.Search.search()
With the latter, you can interrogate the details, such as:
# status
response.status
# raw data (allows you to see navigator results
response.data.raw
# dataframe
response.data.dfOnce you are happy with the outcome, then certainly use the
response = rdp.search()
0 -
nick.zincone.1 · , my bad. Many thanks for the correction regarding "endswith" as well as for the Search. Took note. All works fine.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 280 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 720 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛