Rblpapi icon indicating copy to clipboard operation
Rblpapi copied to clipboard

Larger cap for lookupSecurity maximum results

Open mauritzvdworm opened this issue 3 years ago • 8 comments

Currently it looks like lookupSecurity is capped at a max of 1000 results, can we increase that number?

mauritzvdworm avatar Oct 19 '22 13:10 mauritzvdworm

Sure -- can you recompile and try that it actually works with larger requests, i.e. that the backend doesn't just say 'no thanks' ?

eddelbuettel avatar Oct 19 '22 13:10 eddelbuettel

Hi Dirk, thanks for the speedy reply. I'll try that. In BBG it states the list if a couple thousand lines long but you can only export 250 at a time. I don't want to manually go through that process.

mauritzvdworm avatar Oct 19 '22 13:10 mauritzvdworm

It sounds reasonable -- the result fields for this, as I recall, are small-ish so we may as well consume 10k or more, and as I recall for some classes (corportate bonds, say) there could indeed be a bazillion results. But I switched jobs and industries and don't currently have access to the backend so I have to rely on you (or @johnlaing).

eddelbuettel avatar Oct 19 '22 13:10 eddelbuettel

I'm not sure I understand. Can you provide an example of something you're trying to do that doesn't work?

johnlaing avatar Oct 19 '22 23:10 johnlaing

seems like a bloomberg server side limit

response <- Rblpapi::lookupSecurity('a', maxResults = 1001)
nrow(response) # 1000

lookupSecurity_verbose.txt

Verbose print out shows processing of only 1 single Response event, ie no partial responses. Hence, probably Bloomberg server side limitation.

To fully put this to bed, probably will have to print out what events we are getting back other than Response and Partial Response, as we are currently just silently ignoring them. However, I couldn't be bothered.

klin333 avatar Oct 20 '22 00:10 klin333

I tried the recompile. Still capped at 1000 lines.

mauritzvdworm avatar Oct 20 '22 07:10 mauritzvdworm

So looks like it is the backend as @klin333 reminded us.

So sadly I think we can close this here as there is little we can do.

eddelbuettel avatar Oct 20 '22 12:10 eddelbuettel

I guess we could warn if maxResults > 1000, that's easy and potentially useful

johnlaing avatar Oct 20 '22 12:10 johnlaing