Rblp / Rblpapi

R package interfacing the Bloomberg API from https://www.bloomberglabs.com/api/
Other
167 stars 75 forks source link

Security names returned by lookupSecurity #261

Open joshuaulrich opened 6 years ago

joshuaulrich commented 6 years ago

I was surprised that the security names returned by lookupSecurity() could not be passed directly to another Rblpapi function, like bdh(). I haven't looked at the code to understand where those values come from, though I suspect they're simply passed-through from whatever the API function returns.

So I'm soliciting feedback for the best way to achieve what I want. The options I can think of off the top of my head:

  1. Modify lookupSecurity() to return security names that can be used in other functions
  2. Add a translator function

I was also surprised that the yellowkey values were not consistent with what needs to be used when specifying a security name. Support for that could be added without changing the current defaults.

eddelbuettel commented 6 years ago
All of those would strike me as _API_ issues we cannot do much about given the famously opaque documentation. But if you can come up with workarounds, let us know.
joel23888 commented 6 years ago

@joshuaulrich you could try an approach like the regex referred to in https://github.com/Rblp/Rblpapi/issues/215#issuecomment-296929480. You may need to modify to your exact requirements.