Rblpapi - using bdp with ISIN / Cusip gives error
Asked Answered
J

2

11

I get following error, when I use bdp with ISIN or CUSIP.

bdp ("US25470XAB10 ISIN","ULT_PARENT_TICKER_EXCHANGE")
bdp ("25470XAB1 CUSIP","ULT_PARENT_TICKER_EXCHANGE")

Error in bdp_Impl(con, securities, fields, options, overrides, identity) : 
attempt to set an attribute on NULL

However, using the Bloomberg ID (below) seems to work.

bdp("EI000902 Corp","ULT_PARENT_TICKER_EXCHANGE")

Appreciate any workarounds or solutions.

Jessen answered 8/1, 2016 at 15:24 Comment(1)
Thanks for your response. Using Corp in the name definitely seems to work. But I am hesitant to call this a Bloomberg issue. Using ISIN is the recommended way in the Bloomberg help and using BDP with ISIN seems to work in Excel - then why does this approach not work with Rblpapi?Jessen
S
7

I was having problem with converting CUSIP to TICKER via Rblpapi. This solved my problem.

bdp("/cusip/143130102","TICKER")
Schuster answered 13/7, 2016 at 18:20 Comment(0)
A
4

I think I figured this out. It is not a Rblpapi thing, it is at the bloomberg level. It is a security name formatting thing I guess. According to a guy I spoke with at bloomberg (they are SOMETIMES helpful... SOMEtimes.. ), when you use the ISIN, you have to specify the asset type. You do not use 'ISIN' in the security name, but any one of the asset types located in the yellow keys on the bloomberg keyboard. (Which doesn't make sense, because I know for a fact bond data will sometimes come in using 'ISIN' in the security name, and all types of data seems to always work in the desktop (excel) API. But, whatever. It's Bloomberg.)

So, for example,

bdp ("US25470XAB10 ISIN","ULT_PARENT_TICKER_EXCHANGE")

should be

bdp ("US25470XAB10 Corp","ULT_PARENT_TICKER_EXCHANGE")

I know this works for ISINs, but I dont have CUSIP IDs and have not tested it. (I have a list of foreign preferreds, equities and bonds, and as long as i use 'PFD', 'EQUITY', and 'CORP' after the ISIN, it grabs the data just fine.)

I have been struggling with this same issue for about a day now, and I think this is the solution. So far, it seems to work great. However, please let me know if it breaks for you, or if you find any caveats.

Arlenearles answered 14/1, 2016 at 17:19 Comment(4)
Thanks for your response. Using Corp in the name definitely seems to work. But I am hesitant to call this a Bloomberg issue. Using ISIN is the recommended way in the Bloomberg help and using BDP with ISIN seems to work in Excel - then why does this approach not work with Rblpapi?Jessen
According to the bb helpdesk it is a difference between the B-Pipe API (C++, Rblpapi is a wrapper for B-Pipe), and the desktop API (Excel). I do not know why there is a difference, and I honestly do not know why there are 6 different names for their API. (I always thought what they are calling "B-Pipe" was actually called COM.) Further evidence is that if you use VBA, within Excel, and use the B-Pipe API, you will run into the same problem. (For VBA, you can use this guy's COM wrapper, which I really like. mikejuniperhill.blogspot.com/2013/05/…)Arlenearles
Thank you for the color.Jessen
OMG, I couldn't figure out what the problem was!!! Btw, hopefully someone will build something based on their new BQL syntax.Bluster

© 2022 - 2024 — McMap. All rights reserved.