1
$\begingroup$

I am using the Bloomberg API in R (package Rblpapi) to find the nearby price at elevator locations for Soybean/Corn in given states in the US. I use the function lookupSecurity:

library(Rblpapi) blpConnect() lookupSecurity("CRNYUSOH", yellowkey="indx", maxResults=1000)

The problem is that there is a maximum of 1000 results returned, which seems to originate from the API, not from R. Now I hit this limit for many states, mainly because it returns sometimes multiple maturities per location, while I am only interested in one single maturity.

I get for example duplicates like:

  • CRNYUSAL AAAA xxx CGB
  • CRNYUSAL AAAA xxy CGB
  • CRNYUSAL AAAA xxz CGB

where xxx, xxy and xxz stand for different matirities, while I am only interested in one single maturity.

How can I handle this case? I would like to search for terms without the xxx, but it seems the API is not allowing to do a search with regular expressions? Any other solutions?

Thanks!

$\endgroup$
  • $\begingroup$ Have you tried changing maxResults=1000 to a higher number? $\endgroup$ – assylias Jan 31 '18 at 10:22
  • $\begingroup$ Yes, I did! But ineffective... as the documentation of the function says: appears to be capped at 1000. $\endgroup$ – Matifou Jan 31 '18 at 22:21
  • $\begingroup$ HELP HELP should be able to help. If you get an answer you can post it here for future visitors. $\endgroup$ – assylias Feb 1 '18 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.