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.

pulp_fiction
  • 185
  • 1
  • 12
  • 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? – pulp_fiction Jan 14 '16 at 21:46

2 Answers2

7

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

bdp("/cusip/143130102","TICKER")
Community
  • 1
  • 1
z3r
  • 71
  • 1
  • 1
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.

lukehawk
  • 1,423
  • 3
  • 22
  • 48
  • 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? – pulp_fiction Jan 14 '16 at 21:44
  • 1
    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. http://mikejuniperhill.blogspot.com/2013/05/bloomberg-v3com-api-wrapper-for-vba.html) – lukehawk Jan 15 '16 at 13:36
  • Thank you for the color. – pulp_fiction Jan 15 '16 at 20:45
  • OMG, I couldn't figure out what the problem was!!! Btw, hopefully someone will build something based on their new BQL syntax. – Adrien Jun 30 '20 at 00:58