Rblp / Rblpapi

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

Larger cap for lookupSecurity maximum results #375

Open mauritzvdworm opened 1 year ago

mauritzvdworm commented 1 year ago

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

eddelbuettel commented 1 year ago

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

mauritzvdworm commented 1 year ago

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.

eddelbuettel commented 1 year ago

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).

johnlaing commented 1 year ago

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

klin333 commented 1 year ago

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.

mauritzvdworm commented 1 year ago

I tried the recompile. Still capped at 1000 lines.

eddelbuettel commented 1 year ago

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.

johnlaing commented 1 year ago

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